Skip to content

Sort correlation (ρ) values by absolute magnitude#5

Merged
Alexanderlacuna merged 3 commits intomainfrom
fixes/rho-magnitude-handling
Nov 13, 2025
Merged

Sort correlation (ρ) values by absolute magnitude#5
Alexanderlacuna merged 3 commits intomainfrom
fixes/rho-magnitude-handling

Conversation

@Alexanderlacuna
Copy link
Copy Markdown
Owner

This PR updates the correlation computation and sorting logic to ensure that correlation coefficients (ρ) are sorted by absolute magnitude, reflecting the strength of the correlation regardless of sign.
Key changes:

** Updated custom_float_sorter to sort values by |ρ| (absolute value) instead of signed value.

** Both +∞ and -∞ are now treated as the strongest correlations and appear first (should not happen ).

** NaN values are always placed at the end of sorted lists.

Added and updated tests to verify negative correlations, magnitude-based sorting, and proper handling of NaN/∞.

@Alexanderlacuna Alexanderlacuna merged commit 48604d8 into main Nov 13, 2025
1 check failed
@Alexanderlacuna Alexanderlacuna deleted the fixes/rho-magnitude-handling branch November 13, 2025 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant