Repository navigation
DOC correct error message when checking response values of an estimator - #33084
Closed
qbarthelemy wants to merge 2 commits into
Closed
qbarthelemy wants to merge 2 commits into
qbarthelemy wants to merge 2 commits into
Conversation
Member
|
Thank you for reporting this @qbarthelemy! We noticed something possibly related in #33015 (comment), where Instead of proposing a solution directly, it would be better to open an issue first, so that we can discuss if and how this problem can be approached best. Regarding this PR: |
Member
|
Agreed, let's discuss in an issue first. |
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
What does this implement/fix? Explain your changes.
Current function that checks response values of an estimator
(
_get_response_valuesinscikit-learn/sklearn/utils/_response.py)assumes that if the estimator is not a classifier or an outlier detector, then it is a regressor.
In the latter case, if it doesn't find the
predictfunction,it raises an error stating that the estimator is a regressor:
ValueError: ... Got a regressor....However, the estimator might be something other than a regressor.
For example, it can be a classification
Pipelinewith a MRO issue, see NeuroTechX/moabb#815Many other GitHub repositories have reported this ambiguous error:
dreamquark-ai/tabnet#584
rasbt/mlxtend#1129
dmlc/xgboost#11284
mljar/mljar-supervised#640
csinva/imodels#221
etc
The goal of this pull-request is to correct the message by making it clearer,
specifically by no longer assuming that it is a regressor.
AI usage disclosure
I did not use AI assistance.
Any other comments?