ClimbsRocks / auto_ml

[UNMAINTAINED] Automated machine learning for analytics & production
http://auto-ml.readthedocs.io
MIT License
1.64k stars 310 forks source link

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

Open archaeocharlie opened 5 years ago

archaeocharlie commented 5 years ago

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.