[MRG] Separated regression metrics from other metrics in test_sample_weight_invariance in metrics/tests/test_common.py #8537
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.
|
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.
They are used in the yield statement in the for loop below. Did you mean just y_score?
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.
this condition is not applicable.
There was a problem hiding this comment.
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.
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