concept auc in category machine learning

This is an excerpt from Manning's book Machine Learning Bookcamp.
The ideal model forms a 1x1 square, so the area under its ROC curve is 1, or 100%. The random model takes only half of that, so its AUC is 0.5, or 50%. The AUCs of our two models — the large and the small one — will be somewhere between the random baseline of 50% and the ideal curve of 100%.
An AUC of 0.9 is indicative of a reasonably good model; 0.8 is OK, 0.7 is not very performant, and 0.6 indicates quite poor performance.
To calculate the AUC for our models we can use auc, a function from the metrics package of Scikit-Learn:
from sklearn.metrics import auc auc(df_scores.fpr, df_scores.tpr)For the large model, the result is 0.84; for the small model, it's 0.81 (figure 4.36). Churn prediction is a complex problem, so an AUC of 80% is quite good.