Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CollinearityThreshold bug fix and speedup #41

Merged
merged 5 commits into from
Feb 9, 2024

Conversation

harper357
Copy link
Contributor

Re: #40

This probably should have some tests along with it, but I have wanted to get a PR started with my suggested changes.

@ThomasBury ThomasBury self-assigned this Feb 7, 2024
@ThomasBury ThomasBury added the bug Something isn't working label Feb 9, 2024
Copy link
Owner

@ThomasBury ThomasBury left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more pythonic, tested locally, all good

Copy link
Owner

@ThomasBury ThomasBury left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A remaining component of the previously used symmetrical version. Sorting post-operation is preferred for clarity, but pandas' index-based approach maintain consistency (no bug)

Copy link
Owner

@ThomasBury ThomasBury left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While dividing isn't essential, skipping it could be confusing. We're aiming to find the feature with the highest collinearity. First, we combine the upper and lower halves of the association matrix (since it's not symmetrical). Then, dividing by 2 gives the average and ensures the values never exceed 1, avoiding misinterpretations.

@ThomasBury ThomasBury merged commit 985186d into ThomasBury:main Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants