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

[MRG] Handle edge case Mixvalscorer #257

Merged
merged 2 commits into from
Oct 21, 2024

Conversation

YanisLalou
Copy link
Collaborator

This pull request includes changes to handle cases where there are no indices for intra-cluster or inter-cluster evaluations in the MixValScorer, and updates the corresponding tests to ensure these cases are properly handled.

Handling NaN values in scoring:

  • skada/metrics.py: Added checks to set ice_same and ice_diff to np.nan if their respective index lists are empty. Modified the calculation of ice_score to use np.nanmean instead of a simple average. [1] [2] [3]

Updating tests:

  • skada/tests/test_scorer.py: Added a DummyEstimator class and new test cases to verify that ice_same and ice_diff are set to NaN when appropriate, and that the combined score is calculated correctly even when individual scores are NaN.

@YanisLalou YanisLalou changed the title Handle edge case Mixvalscorer [TO_REVIEW] Handle edge case Mixvalscorer Oct 16, 2024
@tgnassou tgnassou merged commit b23cc02 into scikit-adaptation:main Oct 21, 2024
5 checks passed
@YanisLalou YanisLalou changed the title [TO_REVIEW] Handle edge case Mixvalscorer [MRG] Handle edge case Mixvalscorer Oct 21, 2024
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.

2 participants