Skip to content
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

Problem with utils_scoring score function when using 'roc_auc' #423

Open
archaeocharlie opened this issue Mar 18, 2019 · 0 comments
Open

Comments

@archaeocharlie
Copy link

When a Predictor is instantiated with scoring='roc_auc', calls to the score function in utils_scoring.py generate the error: Warning: We have found some values in the predicted probabilities that fall outside the range {0, 1}.

In my case, which involves binary prediction, the score function in utils_scoring.py sets predictions = estimator.predict_proba(X), which generates a probability for the negative and positive class. The y values passed to score = self.scoring_func(y, predictions) are single 0/1 and not a probability for each class. This causes an underlying 'bad input shape error' which is caught and results in that error message.

Am I missing something here, or do we need to change the way the roc_auc scorer is handled by utils_scoring.py score and just get the dominant class probability from `estimator.predict_proba'? If nothing else, a better error message would be helpful.

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

No branches or pull requests

1 participant