Skip to content

[MRG] MAINT explicit fail messages on non supported targets #544

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 16 commits into from
Jun 11, 2019

Conversation

chkoar
Copy link
Member

@chkoar chkoar commented Feb 13, 2019

Reference Issue

Fixes #543

What does this implement/fix? Explain your changes.

Makes the error messages regarding the targets more friendly to the user by providing explicit error messages

@pep8speaks
Copy link

pep8speaks commented Feb 13, 2019

Hello @chkoar! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2019-06-11 21:56:16 UTC

@chkoar
Copy link
Member Author

chkoar commented Feb 13, 2019

@glemaitre when you have time review the changes please

@chkoar chkoar changed the title [WIP] Explicit fails on not supported targets Explicit fails on not supported targets Feb 13, 2019
@chkoar chkoar changed the title Explicit fails on not supported targets Explicit fail messages on non supported targets Feb 13, 2019
@codecov
Copy link

codecov bot commented Feb 14, 2019

Codecov Report

Merging #544 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #544      +/-   ##
==========================================
- Coverage   98.88%   98.86%   -0.02%     
==========================================
  Files          84       82       -2     
  Lines        5184     5042     -142     
==========================================
- Hits         5126     4985     -141     
+ Misses         58       57       -1
Impacted Files Coverage Δ
imblearn/utils/_validation.py 100% <ø> (ø) ⬆️
imblearn/ensemble/tests/test_weight_boosting.py 100% <ø> (ø) ⬆️
imblearn/utils/estimator_checks.py 96.91% <100%> (ø) ⬆️
imblearn/over_sampling/tests/test_smote_nc.py 100% <100%> (ø) ⬆️
imblearn/ensemble/_weight_boosting.py 96.84% <100%> (+0.03%) ⬆️
imblearn/ensemble/_easy_ensemble.py 100% <100%> (ø) ⬆️
imblearn/ensemble/_bagging.py 100% <100%> (ø) ⬆️
imblearn/tests/test_pipeline.py 99% <0%> (-0.07%) ⬇️
imblearn/tests/test_common.py 97.43% <0%> (-0.07%) ⬇️
... and 26 more

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 f30d0cf...0d04978. Read the comment docs.

@chkoar chkoar requested a review from glemaitre February 14, 2019 14:34
@@ -493,3 +494,12 @@ def test_max_samples_consistency():
random_state=1)
bagging.fit(X, y)
assert bagging._max_samples == max_samples


def test_bagging_multioutput_multilabel_error():
Copy link
Member

Choose a reason for hiding this comment

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

Can we add those into the common tests instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

@glemaitre do you mean as parametrized test in imblearn.tests.test_common?

Copy link
Member

Choose a reason for hiding this comment

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

Partially yes. We need to add a test to estimator_check.py. No need to parametrize. Common tests are yielding the sampler one by one and give it to the tests to be used. Here we need to add a common test which will be used for the classifier basically.

Copy link
Member Author

Choose a reason for hiding this comment

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

@glemaitre I think I am done

Copy link
Member Author

Choose a reason for hiding this comment

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

No. I need to remove some code.

Copy link
Member Author

Choose a reason for hiding this comment

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

@glemaitre what do you think?

@chkoar chkoar changed the title Explicit fail messages on non supported targets [MRG] Explicit fail messages on non supported targets Mar 2, 2019
@glemaitre glemaitre changed the title [MRG] Explicit fail messages on non supported targets [MRG] MAINT explicit fail messages on non supported targets Jun 11, 2019
@glemaitre glemaitre merged commit 56fb7d2 into scikit-learn-contrib:master Jun 11, 2019
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.

Fail explicitly on multilabel/multiouput targets
3 participants