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.
When a
Predictor
is instantiated withscoring='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 toscore = 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.