ArticleslgStudy

mathematics

Probabilistic classification

Probabilistic classification is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Probabilistic classification rather than just read about it. In short: In machine learning, a probabilistic classifier is a classifier that is able to predict, given an observation of an input, a probability distribution over a set of classes, rather than only outputting the most likely class that the observation should belong to. Probabilistic classifiers provide classification that can be useful in its own right or when combining classifiers into ensembles.

Probabilistic classification — main illustration
Probabilistic classification — illustration

Key takeaways

  • Probabilistic classification belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Probabilistic classification to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Probabilistic classification from memory before moving on to harder problems.

Reference excerpt

In machine learning, a probabilistic classifier is a classifier that is able to predict, given an observation of an input, a probability distribution over a set of classes, rather than only outputting the most likely class that the observation should belong to. Probabilistic classifiers provide classification that can be useful in its own right or when combining classifiers into ensembles.

Types of classification Formally, an "ordinary" classifier is some rule, or function, that assigns to a sample x a class label ŷ:

y ^ = f ( x ) {\displaystyle {\hat {y}}=f(x)}

The samples come from some set X (e.g., the set of all documents, or the set of all images), while the class labels form a finite set Y defined prior to training. Probabilistic classifiers generalize this notion of classifiers: instead of functions, they are conditional distributions Pr ( Y | X ) {\displaystyle \Pr(Y\vert X)} , meaning that for a given x ∈ X {\displaystyle x\in X} , they assign probabilities to all y ∈ Y {\displaystyle y\in Y} (and these probabilities sum to one). "Hard" classification can then be done using the optimal decision rule

y ^ = arg ⁡ max y ⁡ Pr ( Y = y | X ) {\displaystyle {\hat {y}}=\operatorname {\arg \max } _{y}\Pr(Y=y\vert X)}

or, in English, the predicted class is that which has the highest probability. Binary probabilistic classifiers are also called binary regression models in statistics. In econometrics, probabilistic classification in general is called discrete choice. Some classification models, such as naive Bayes, logistic regression and multilayer perceptrons (when trained under an appropriate loss function) are naturally probabilistic. Other models such as support vector machines are not, but methods exist to turn them into probabilistic classifiers.

Generative and conditional training Some models, such as logistic regression, are conditionally trained: they optimize the conditional probability Pr ( Y | X ) {\displaystyle \Pr(Y\vert X)} directly on a training set (see empirical risk minimization). Other classifiers, such as naive Bayes, are trained generatively: at training time, the class-conditional distribution Pr ( X | Y ) {\displaystyle \Pr(X\vert Y)} and the class prior Pr ( Y ) {\displaystyle \Pr(Y)} are found, and the conditional distribution Pr ( Y | X ) {\displaystyle \Pr(Y\vert X)} is derived using Bayes' rule.

Probability calibration

Not all classification models are naturally probabilistic, and some that are, notably naive Bayes classifiers, decision trees and boosting methods, produce distorted class probability distributions. In the case of decision trees, where Pr(y|x) is the proportion of training samples with label y in the leaf where x ends up, these distortions come about because learning algorithms such as C4.5 or CART explicitly aim to produce homogeneous leaves (giving probabilities close to zero or one, and thus high bias) while using few samples to estimate the relevant proportion (high variance).

Calibration can be assessed using a calibration plot (also called a reliability diagram). A calibration plot shows the proportion of items in each class for bands of predicted probability or score (such as a distorted probability distribution or the "signed distance to the hyperplane" in a support vector machine). Deviations from the identity function indicate a poorly-calibrated classifier for which the predicted probabilities or scores can not be used as probabilities. In this case one can use a method to turn these scores into properly calibrated class membership probabilities. For the binary case, a common approach is to apply Platt scaling, which learns a logistic regression model on the scores. An alternative method using isotonic regression is generally superior to Platt's method when sufficient training data is available. In the multiclass case, one can use a reduction to binary tasks, followed by univariate calibration with an algorithm as described above and further application of the pairwise coupling algorithm by Hastie and Tibshirani.

Evaluating probabilistic classification

A method used to assign scores to pairs of predicted probabilities and actual discrete outcomes, so that different predictive methods can be compared, is called a scoring rule. Scoring rules are used to compare the predicted probability to observed outcomes, these include for example log loss, Brier score, Continuous ranked probability score and others. Specific aspects like accuracy, calibration, sharpness or dispersion may vary from one probabilistic classifier to another one and may be specifically investigated. Calibration errors metrics aim to quantify the extent to which a probabilistic classifier's outputs are well-calibrated. As Philip Dawid put it, "a forecaster is well-calibrated if, for example, of those events to which he assigns a probability 30 percent, the long-run proportion that actually occurs turns out to be 30 percent". Foundational work in the domain of measuring calibration error is the Expected Calibration Error (ECE) metric. More recent works propose variants to ECE that address limitations of the ECE metric that may arise when classifier scores concentrate on narrow subset of the [0,1], including the Adaptive Calibration Error (ACE) and Test-based Calibration Error (TCE).

… excerpt ends here. Continue reading the full article.

Illustrations

Probabilistic classification: Models are assessed via Accuracy, Calibration, Sharpness (minimal uncertainty), and Dispersion (similar uncertainties everywhere).
Models are assessed via Accuracy, Calibration, Sharpness (minimal uncertainty), and Dispersion (similar uncertainties everywhere).

Worked examples

Example 1 — a first encounter with Probabilistic classification

Start with the simplest possible case. Write down what Probabilistic classification claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Probabilistic classification before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Probabilistic classification ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Probabilistic classification

In research
Probabilistic classification appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Probabilistic classification in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Probabilistic classification is common in secondary-school and first-year university syllabi. It links to neighbouring topics Probabilistic models, Statistical classification, so understanding it makes those chapters shorter.
In everyday life
Look for Probabilistic classification outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Probabilistic classification in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Probabilistic classification means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Probabilistic classification out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Probabilistic classification in simple terms?

In machine learning, a probabilistic classifier is a classifier that is able to predict, given an observation of an input, a probability distribution over a set of classes, rather than only outputting the most likely class that the observation should belong to. Probabilistic classifiers provide cla…

Why does Probabilistic classification matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Probabilistic classification?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Probabilistic classification.

Tags

  • Probabilistic models
  • Statistical classification

Keep exploring