liveBook · Manning

Precision

As explained in Knowledge Graphs and LLMs in Action

Precision is the proportion of predicted positive instances that are correct.

Precision measures how often positive predictions are correct. It answers a practical question: when a model labels an instance as positive, how often is that decision right? section 12.1.5

Use precision as part of a broader evaluation workflow:

  • Compare precision with recall, which measures how many existing target instances the model finds. section 12.1.5
  • Use F1-score when evaluation needs to balance prediction correctness with finding as many correct instances as possible. section 12.1.5
  • For imbalanced classes, select an appropriate averaging method; weighted averaging reflects the distribution of licit and illicit nodes. section 12.1.5
  • Evaluate extraction systems per class for entities and relations, then use the results to identify systematic failures and monitor model drift. section 5.3.3

AML node classification

For a graph model classifying nodes as licit or illicit, precision asks how often each prediction is correct. GCN, GAT, and SAGE precision can be compared on the validation dataset during training. section 12.1.5

Figure 12.5 Performance of GCN, GAT, and SAGE across precision, recall, and F1-score on the validation dataset during the training phase
figure

Compare GCN, GAT, and SAGE across precision, recall, and F1-score over training epochs. section 12.1.5

Figure 12.6 Confusion matrices to understand the performance of GCN, GAT, and SAGE models on each class (licit or illicit)
figure

Inspect class-specific confusion matrices to understand where correct and incorrect licit or illicit predictions affect precision. section 12.1.5

How Knowledge Graphs and LLMs in Action covers it

How deep it goes
Defines prediction correctness and applies it through per-class scoring, weighted averaging, validation plots, and confusion matrices.
Examples
Uses AML models classifying licit and illicit nodes and information-extraction systems predicting entities and relations.
What you can do after
Evaluate model predictions with scikit-learn scoring functions and compare precision across classes, models, epochs, and validation data.
How it connects
Connects precision with recall, F1-score, confusion matrices, imbalanced datasets, node classification, and link prediction.

Also explained in

Compare how 20 books explain precision →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Knowledge Graphs and LLMs in Action. The section links point to the parts of the book it draws on.