user
user

Reputation: 2103

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?

Upvotes: 2

Views: 1626

Answers (2)

MhFarahani
MhFarahani

Reputation: 970

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.

Upvotes: 1

BrenBarn
BrenBarn

Reputation: 251378

As the documentation says, it is the area under an arbitrary curve, i.e., the definite integral (computed with the trapezoidal approximation). Some examples are linked at the bottom of the documentation page showing its use.

Upvotes: 1

Related Questions