8000 [MRG] Separated regression metrics from other metrics in test_sample_weight_invariance in metrics/tests/test_common.py by nikitasingh981 · Pull Request #8537 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

[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

Merged
merged 6 commits into from
Mar 5, 2017

Conversation

nikitasingh981
Copy link
Contributor

Reference Issue

#6551

@codecov
Copy link
codecov bot commented Mar 5, 2017

Codecov Report

Merging #8537 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #8537      +/-   ##
==========================================
+ Coverage   95.48%   95.48%   +<.01%     
==========================================
  Files         342      342              
  Lines       60987    61000      +13     
==========================================
+ Hits        58233    58246      +13     
  Misses       2754     2754
Impacted Files Coverage Δ
sklearn/metrics/tests/test_common.py 99.52% <100%> (+0.01%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6852a03...5e19b9a. Read the comment docs.

Copy link
Member
@jnothman jnothman left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM

# 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,))
Copy link
Member

Choose a reason for hiding this comment

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

unused

Copy link
Contributor Author
@nikitasingh981 nikitasingh981 Mar 5, 2017

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?

Copy link
Member

Choose a reason for hiding this comment

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

yes

if name not in REGRESSION_METRICS:
continue
if (name in METRICS_WITHOUT_SAMPLE_WEIGHT or
name in METRIC_UNDEFINED_BINARY):
Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Member

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!

@GaelVaroquaux
Copy link
Member

LGTM. Given that @jnothman was also +1, I am merging this. Thanks!

@GaelVaroquaux GaelVaroquaux merged commit a36c852 into scikit-learn:master Mar 5, 2017
@nikitasingh981 nikitasingh981 deleted the feature branch March 5, 2017 19:49
@Przemo10 Przemo10 mentioned this pull request Mar 17, 2017
herilalaina pushed a commit to herilalaina/scikit-learn that referenced this pull request Mar 26, 2017
…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
massich pushed a commit to massich/scikit-learn that referenced this pull request Apr 26, 2017
…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
Sundrique pushed a commit to Sundrique/scikit-learn that referenced this pull request Jun 14, 2017
…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
NelleV pushed a commit to NelleV/scikit-learn that referenced this pull request Aug 11, 2017
…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
paulha pushed a commit to paulha/scikit-learn that referenced this pull request Aug 19, 2017
…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
maskani-moh pushed a commit to maskani-moh/scikit-learn that referenced this pull request Nov 15, 2017
…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
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.

3 participants
0