AI Glossary / Probabilistic machine learning / Advanced
Regularized discriminant analysis
Definition
Regularized discriminant analysis is a classification approach that stabilizes estimated class covariance matrices through shrinkage. In Friedman's formulation, it combines class-specific and pooled covariance information, then shrinks eigenvalues toward a common value within each matrix, creating a tunable family between familiar discriminant rules.
What it means
Quadratic discriminant analysis estimates a separate covariance matrix for each class. Linear discriminant analysis uses a shared covariance matrix. The first can capture more differences between classes, but it needs enough data to estimate those differences reliably.
Regularized discriminant analysis offers intermediate choices. It can reduce instability when there are many features relative to observations, including cases where an estimated covariance is singular. The aim is better classification through a bias-variance tradeoff, not recovering an unaltered sample covariance at all costs. Different software may use different shrinkage targets or parameter conventions.
How it works
Estimate class means, within-class covariance information, and class probabilities. In Friedman's original first stage, combine the class scatter matrix and pooled scatter matrix, dividing by the corresponding combined class and total weights. A parameter lambda controls this pooling, with zero giving separate class estimates and one giving a common pooled estimate.
Next set Sigma_k_final = (1 - gamma) Sigma_k_mix + gamma [trace(Sigma_k_mix)/d] I, where d is feature dimension. Gamma controls shrinkage toward a spherical covariance with the same average variance. This is distinct from merely removing off-diagonal entries.
Use the resulting matrices in Gaussian discriminant scores, including the quadratic distance, log determinant, and class-prior term. Select shrinkage strengths using an appropriate validation procedure. The original pooling parameter is not simply the convex weight on a pooled covariance in every class; sample sizes enter the conversion.
Three practical examples
- Product inspection: a classifier combines several sensor measurements when few labeled examples exist for each defect category.
- Document classification research: a team tests a covariance-regularized baseline on compact text representations, checking whether extra class-specific covariance flexibility improves held-out predictions.
- Laboratory classification: an analyst compares LDA, QDA, and intermediate shrinkage choices when measurements are correlated and individual groups have small training samples.
Think of it this way
Think of estimating each neighborhood's traffic pattern with limited observations. You can borrow information from the whole city, then smooth implausibly extreme differences between directions. Borrow too much and real neighborhood differences disappear; borrow too little and random variation dominates. The analogy describes the tradeoff rather than prescribing how much shrinkage any dataset needs.
Worked example
Consider an original two-class example with equal sample sizes n_A = n_B = 10, two features, and maximum-likelihood class covariances S_A = diag(4, 0), S_B = diag(0, 4). Their pooled within-class covariance is diag(2, 2). Both class matrices are singular.
In Friedman's scatter-weight convention, choose lambda = 1/3. Each class contribution has weight (1 - lambda)10 = 20/3, and the pooled contribution has weight lambda20 = 20/3. The mixed covariance therefore averages the class and pooled matrices equally: M_A = diag(3, 1), M_B = diag(1, 3).
Choose gamma = 1/2. Each mixed matrix has average variance 2. Shrinking halfway toward 2I gives C_A = diag(2.5, 1.5) and C_B = diag(1.5, 2.5), both invertible with determinant 3.75.
Let class means be (0, 0) and (2, 0), with equal prior probabilities. For x = (1.2, 0.5), squared Mahalanobis distances are 1.44/2.5 + 0.25/1.5 = 0.7427 for A and 0.64/1.5 + 0.25/2.5 = 0.5267 for B. Since determinants and priors match, the lower score selects B. This demonstrates the calculation, not validated predictive accuracy.
Illustrative case study
In a fictional project, Maple Quality uses two correlated sensor channels to classify production faults. Separate covariance estimates become unstable for a rarely observed fault category, while a fully pooled model appears to miss some group differences.
The team evaluates a grid of pooling and spherical-shrinkage settings with batches kept separate between training and validation. It reports errors for each fault category and compares against both LDA and QDA. Before deployment, it checks whether the selected model remains stable on later production batches. The case illustrates selecting a compromise rather than assuming that more regularization always improves accuracy.
Common misconceptions and mistakes
Spherical shrinkage is not the same as diagonal covariance estimation: it also moves diagonal variances toward their average. A pooled covariance must use within-class variation, not blindly include differences between class means.
Regularization can make inversion possible without making the class model correct. It does not automatically remove outliers or repair incorrect labels. Class priors and unequal error costs can change decisions even when distance calculations are unchanged. Finally, a parameter called lambda in one package may have a different direction or weighting convention elsewhere; compare formulas rather than names.
Business use
Use this method as an interpretable statistical baseline when covariance estimation is a practical bottleneck. Specify the covariance denominator, pooling rule, shrinkage target, feature scaling, and class-prior assumptions. Scaling matters because shrinking toward a spherical matrix treats coordinate units as comparable.
Evaluate the entire tuning procedure on held-out data. Include minority-class results and deployment-relevant error costs instead of only overall accuracy. Check numerical conditioning and retain the selected covariance matrices for review. If feature distributions are strongly non-Gaussian or multimodal, compare alternatives rather than expecting covariance shrinkage alone to capture that structure.
People also ask
Does regularized discriminant analysis always have linear boundaries?
No. Different regularized class covariance matrices generally retain quadratic boundaries.
What gives ordinary LDA in the original family?
Full pooling with no additional spherical shrinkage.
Does a nonsingular covariance guarantee good classification?
No. It enables the standard calculation, but generalization still depends on data, assumptions, and tuning.
Check your understanding
Why was lambda = 1/3 used to obtain equal mixing in the example?
Answer: Friedman's original formula combines weighted scatters. With class size 10 and total size 20, lambda = 1/3 makes the class and pooled weights equal. Using lambda = 1/2 would not give equal covariance weights under that convention.
Related terms
- Linear discriminant analysis
- Mahalanobis distance
- Eigenvalue
- Cross-validation
- quadratic discriminant analysis
- covariance shrinkage
- pooled covariance
- class prior
- bias-variance tradeoff
Learn next
Recalculate the example with unequal class sizes and observe how the same original lambda changes effective pooling weights. Then vary gamma and compare covariance conditioning with held-out classification performance.
More in Probabilistic machine learning
- Recursive least squares - Recursive least squares is an algorithm for updating a least-squares parameter estimate as new observations arrive.
- Reference prior - A reference prior is a prior distribution constructed by a formal information-based procedure to provide a baseline Bayesian analysis for a specified...
- Regularization path - A regularization path is the sequence of fitted model solutions obtained as the strength of a regularization penalty varies.
- REINFORCE - REINFORCE is a family of stochastic gradient methods that adjusts a policy using sampled rewards or returns multiplied by the gradient of the log...
- Representational similarity analysis - Representational similarity analysis compares how different systems distinguish the same set of items or conditions.
- Residual flow - A residual flow is a normalizing-flow model built from invertible residual transformations of the form f(x) = x + g(x).
Sources
Friedman, Regularized Discriminant Analysis, original1989 article, equations16–19 and model selection section, university-hosted copy: https://www.leg.ufpr.br/~eferreira/CE064/Regularized%20Discriminant%20Analysis.pdf Stanford Statistics, original technical-report record: https://statistics.stanford.edu/technical-reports/regularized-discriminant-analysis Friedman equations 16–19 independently consulted for scatter-weighted pooling, spherical shrinkage and discriminant scoring.
Previous: Regularization rate Next: Regularized empirical risk minimization