I am doing binary classification using the classifiers from scikit learn. I would ideally like to optimize the AUC directly rather than use cross entropy or log loss as a proxy. Are there any classifiers that can do this? I would happily move to another library if that would help.
Asked
Active
Viewed 975 times
0
-
2You may want to check this question & answers https://stackoverflow.com/questions/52041931/is-there-an-optimizer-in-keras-based-on-precision-or-recall-instead-of-loss/52042520#52042520 this is for keras, but the question is about the same issue – Frayal Jan 25 '21 at 10:24
-
why change the loss function when you can train by choosing a scoring function of your choice, here in your case, AUC. https://scikit-learn.org/stable/modules/model_evaluation.html#defining-your-scoring-strategy-from-metric-functions – prashanth Jan 25 '21 at 11:37
-
This will be an indirect optimisation induced by the link between metric and loss, if chosen wisely. However, OP wants to directly optimize a non sub-differentiable function, hence the short answer is you can't do it. Recent work however show the new definition of a loss derivated from the fbeta metric. This could be used for direct optimization even if, and this important, this is not the fbeta used as loss. – Frayal Jan 25 '21 at 12:29
-
I did find https://stats.stackexchange.com/a/199392/30235 but I am not sure what to make of it. – Simd Jan 25 '21 at 12:34