Search code examples
scikit-learnauc

What is the AUC score in sklearn.metrics?


In sklearn.metrics.auc documentation the auc score is discussed, but this is different from the regular roc_auc_score. I see no description of this, what is it and what is it used for?


Solution

  • sklearn.auc is a general fuction to calculate the area under a curve using trapezoid rule. It is used to calculate sklearn.metrics.roc_auc_score.

    To calculate roc_auc_score, sklearn evaluates the false positive and true positive rates using the sklearn.metrics.roc_curve at different threshold settings. Then it uses sklearn.metrics.auc to calculate the area under the curves, and finally returns their average binary score.