Home › Glossary › Fundamentals › Classification threshold

Intermediate · Fundamentals

Classification threshold

Visual diagram · (in preparation) · Math · (in preparation) · Worked example · 3 difficulty levels.

TL;DR. A cutoff value used in binary classification to convert a model's raw output score into a final class prediction.

Technical Definition

A cutoff value used in binary classification to convert a model's raw output score into a final class prediction.

How it works

In binary classification, the classification threshold is a manually set value between 0 and 1. The model's raw output, also a value between 0 and 1, is compared against this threshold. If the raw output exceeds the threshold, the positive class is predicted; otherwise, the negative class is predicted. This threshold is determined by a human, not learned during model training, and influences the trade-off between precision and recall.

Related Concepts

  • Precision — Of the items the model predicted positive, the fraction that are actually positive.
  • Recall — Of all the actually positive items, the fraction the model successfully found.
  • Binary classification — A machine learning task that categorizes input into one of two mutually exclusive classes, like 'spam' or 'not spam'.

Further Reading

  • Google ML Glossary