-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[MRG] Separated 8000 regression metrics from other metrics in test_sample_weight_invariance in metrics/tests/test_common.py #8537
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8537 +/- ##
==========================================
+ Coverage 95.48% 95.48% +<.01%
==========================================
Files 342 342
Lines 60987 61000 +13
==========================================
+ Hits 58233 58246 +13
Misses 2754 2754
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise LGTM
sklearn/metrics/tests/test_common.py
Outdated
# regression | ||
y_true = random_state.random_sample(size=(n_samples,)) | ||
y_pred = random_state.random_sample(size=(n_samples,)) | ||
y_score = random_state.random_sample(size=(n_samples,)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are used in the yield statement in the for loop below. Did you mean just y_score?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
sklearn/metrics/tests/test_common.py
Outdated
if name not in REGRESSION_METRICS: | ||
continue | ||
if (name in METRICS_WITHOUT_SAMPLE_WEIGHT or | ||
name in METRIC_UNDEFINED_BINARY): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this condition is not applicable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both conditions or just the latter (metric_undefined_binary)? The former is used because when removed regression tests fail
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Obviously then just the latter!
LGTM. Given that @jnothman was also +1, I am merging this. Thanks! |
…weight_invariance in metrics/tests/test_common.py (scikit-learn#8537) * Separated tests for regression features in test_sample_weight_invariance * Fixed pep8 * Removed unecessary check for regression * Updated regression metrics * Joel's suggestions
…weight_invariance in metrics/tests/test_common.py (scikit-learn#8537) * Separated tests for regression features in test_sample_weight_invariance * Fixed pep8 * Removed unecessary check for regression * Updated regression metrics * Joel's suggestions
…weight_invariance in metrics/tests/test_common.py (scikit-learn#8537) * Separated tests for regression features in test_sample_weight_invariance * Fixed pep8 * Removed unecessary check for regression * Updated regression metrics * Joel's suggestions
…weight_invariance in metrics/tests/test_common.py (scikit-learn#8537) * Separated tests for regression features in test_sample_weight_invariance * Fixed pep8 * Removed unecessary check for regression * Updated regression metrics * Joel's suggestions
…weight_invariance in metrics/tests/test_common.py (scikit-learn#8537) * Separated tests for regression features in test_sample_weight_invariance * Fixed pep8 * Removed unecessary check for regression * Updated regression metrics * Joel's suggestions
…weight_invariance in metrics/tests/test_common.py (scikit-learn#8537) * Separated tests for regression features in test_sample_weight_invariance * Fixed pep8 * Removed unecessary check for regression * Updated regression metrics * Joel's suggestions
Reference Issue
#6551