Fixes #4632: Add weighted_test_score option to sklearn model selection module#10800
Closed
algoGuruZ wants to merge 5 commits intoscikit-learn:masterfrom
Closed
Fixes #4632: Add weighted_test_score option to sklearn model selection module#10800algoGuruZ wants to merge 5 commits intoscikit-learn:masterfrom
algoGuruZ wants to merge 5 commits intoscikit-learn:masterfrom
Conversation
|
This pull request introduces 2 alerts when merging 8a0af5e into 47ce5e1 - view on lgtm.com new alerts:
Comment posted by lgtm.com |
jnothman
reviewed
Mar 12, 2018
Member
There was a problem hiding this comment.
Thanks. A few points:
- cross_validation.py and grid_search.py will disappear before the next release, so please revert any changes there
- The API needs to be explicit, rather than magically finding fit parameters with a relevant suffix. For instance, weighted_test_score could accept the param name if it is not plain old sample_weight
- We have been exploring generic solutions to this issue for a long time (#4497 and related). I'd rather see one of those implemented, but would consider this kind of specific solution in the meantime
- This needs tests
Author
|
Thanks for the comments. Let me work on the suggested points above. |
Author
|
This PR is superseded by #10806. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reference Issues/PRs
Fixes #4632
What does this implement/fix? Explain your changes.
Add weighted_test_score option so that user can choose to specify whether CV score is weighted or un-weighted. This is very important to certain fields of research, e.g. finance. For now, it is silently default to un-weighted, which is a little undesirable.
Any other comments?
The current fix deals with pipeline as well as regular sklearn estimators.