liveBook · Manning

Area under the curve

As explained in Graph Neural Networks in Action

The area under a receiver operating characteristic curve, measuring a classifier's ability to rank positive examples above negative examples across thresholds.

Area Under the Curve (AUC) summarizes the area beneath a receiver operating characteristic (ROC) curve. It measures how well a classifier separates positive from negative examples across decision thresholds: larger values indicate better ranking performance. The ROC curve plots true-positive rate against false-positive rate, while the diagonal represents chance-level behavior. section 4.3 section 5.2.3

Use AUC as a practical comparison metric when evaluating classifiers or link-prediction models:

  • Compare models on the same test split using predicted probabilities rather than only hard class labels. section 4.3 section 4.3.1
  • Inspect the ROC curve alongside its AUC; a curve near the diagonal signals weak separation, even when another metric appears acceptable. section 4.3.1
  • Treat AUC as a ranking-oriented summary across thresholds, not as a single operating-point measure. section 4.3
  • For graph autoencoders, calculate AUC on validation and test edge predictions after training, with nonexistent edges represented as negative examples. section 5.2.3

Baseline comparison

On the same tabular node-feature split, logistic regression achieves about 75.90% ROC AUC, an MLP reaches 85.93%, and XGBoost reaches 94.17%. The ROC plots make the ranking difference visible: XGBoost lies above the other baseline curves, while logistic regression remains relatively close to chance. section 4.3.1 section 4.3

from sklearn.metrics import roc_curve 
fpr, tpr, _ = roc_curve(ytest,ypred)   #1

plt.figure(1)
plt.plot([0, 1], [0, 1])
plt.plot(fpr, tpr)
plt.xlabel('False positive rate')
plt.ylabel('True positive rate')
plt.show()

Plot false-positive rate against true-positive rate to inspect the ROC curve and its relationship to the chance diagonal. section 4.3.1

How Graph Neural Networks in Action covers it

How deep it goes
Defines ROC/AUC intuitively and demonstrates computation, but defers formal derivation and threshold-selection procedures.
Examples
Uses logistic regression, XGBoost, MLP, and graph-autoencoder edge prediction with validation and test scores.
What it assumes
Assumes binary labels, train/test splitting, predicted probabilities, and basic ROC terminology while demonstrating evaluation from code.
What you can do after
Apply AUC via scikit-learn to compare probability predictions and evaluate graph-autoencoder link predictions.
How it connects
Connects AUC to ROC curves, binary classification, baseline models, graph autoencoders, link prediction, and negative sampling.

Also explained in

Compare how 12 books explain area under the curve →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Graph Neural Networks in Action. The section links point to the parts of the book it draws on.