liveBook · Manning

Accuracy

As explained in Grokking AI Algorithms, Second Edition

An accuracy score is the proportion of evaluated predictions that match their correct outcomes.

Accuracy is the share of evaluated predictions that match the actual outcomes. For a classifier, it summarizes how often the model is correct overall. section 8.18

Measure it on examples the model has not seen during training: a score on training data can be misleading. Accuracy gives an overall view, so check other metrics when you need more detail about performance across classes. section 8.12 section 8.13 section 8.18

Diamond-cut predictions

In the ten-example test set, seven predicted cuts match the actual cuts, so the classifier is correct on seven of ten examples. section 8.18

Table 8.17 The diamond dataset for classification and predictions

Carat

Price

Cut

Prediction

1

0.26

689

Okay

Okay

✓

2

0.41

880

Perfect

Perfect

✓

3

0.52

1,012

Perfect

Perfect

✓

4

0.76

907

Okay

Okay

✓

5

0.81

2,650

Okay

Okay

✓

6

0.90

2,634

Okay

Okay

✓

7

1.24

2,999

Perfect

Okay

✗

8

1.42

3,850

Perfect

Okay

✗

9

1.61

4,345

Perfect

Perfect

✓

10

1.78

3,100

Okay

Perfect

✗

Compare each predicted diamond cut with its actual cut to see which examples count as correct. section 8.18

How Grokking AI Algorithms, Second Edition covers it

How deep it goes
Defines overall correctness through a worked classification example, while noting other metrics reveal additional performance details.
Examples
Uses a ten-diamond cut-classification test set, with seven predictions matching their actual classes.
What it assumes
Assumes access to model predictions and actual outcomes, and introduces testing with examples unseen during training.
What you can do after
Evaluate/understand a classifier’s overall correctness by comparing its predictions with actual outcomes.
How it connects
Connects accuracy with classification, confusion matrices, precision, recall, specificity, and overfitting.

Also explained in

Compare how 32 books explain accuracy →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking AI Algorithms, Second Edition. The section links point to the parts of the book it draws on.