NEW
The log-odds transformation of a probability, often used as unnormalized model scores before softmax.
DESCRIPTION
In statistics, the logit function maps probabilities in (0,1) to real numbers by taking the logarithm of the odds p/(1−p). In machine learning, model outputs before softmax are commonly referred to as logits—raw, unnormalized scores. Using logits improves numerical stability in loss computations such as cross-entropy. The logistic function is the inverse of the logit, converting log-odds back to probabilities. Understanding logits is crucial for calibration, thresholding, and interpreting classification model confidence.
ALTERNATIVE DEFINITIONS
Wikipedia
In statistics, the logit function or the log-odds is the logarithm of the odds p/(1−p). It is the inverse of the logistic function.
Defines logit as log-odds and notes inverse relationship to logistic.
Google Developers
Logits are the raw, unnormalized scores output by a classification model before applying a normalization function such as softmax to obtain probabilities.
Focuses on practical ML usage as model outputs prior to normalization.
PyTorch
This criterion expects unnormalized scores (often called logits) for each class.
Clarifies expectation of logits for stable loss computation.
RELATED TERMS
Softmax Function Odds Cross-Entropy Loss Logistic Regression Link Function Log-Likelihood Softmax Activation Function Neural Network Output Layer Calibration Temperature Scaling Argmax
COMPETING TERMS
Logistic Function Relative Frequency Log-Odds
KNOWLEDGE AREAS
TARGET AUDIENCE
Data Scientist AI Engineer Data Analyst MLOps Engineer
EXTERNAL SOURCES
- Wikipedia - Logit
- Google Developers - ML glossary entry on logits
- PyTorch - Loss expects logits documentation
- TensorFlow - API expecting unscaled logits
- PyTorch - Softmax normalization of logits
TOP QUESTIONS
What is a logit in machine learning?
A logit is a model’s raw, unnormalized score before applying a normalization function like softmax to produce probabilities.
Category: Definition
How do logits relate to probabilities?
Logits can be converted to probabilities via the logistic function (binary) or softmax (multiclass).
Category: Basics
Why do loss functions often require logits?
Using logits avoids numerical instability from separately applying sigmoid or softmax before computing cross-entropy.
Category: BestPractice
What is the difference between logit and logistic function?
Logit maps probability to log-odds; the logistic function is its inverse, mapping log-odds back to probability.
Category: Comparison
Can logits be interpreted directly?
Directly, they indicate relative preference; for calibrated interpretation, convert to probabilities and assess calibration.
Category: Misunderstanding
How do thresholds on logits affect classification?
Thresholds determine decision boundaries; adjusting them trades precision for recall depending on the application.
Category: HowTo
Are logits always log-odds?
In binary models they align with log-odds; in multiclass settings, logits are unnormalized scores not directly log-odds.
Category: Clarification
How are logits used in calibration?
Platt scaling or temperature scaling operates on logits to improve probability calibration.
Category: Application
What units do logits have?
Logits are in log-odds units; they are dimensionless real numbers.
Category: Basics