Skip to content

Linear Discriminant Analysis

LDA online with classification, eigenvalues, Wilks lambda and confusion matrix.

Open the Linear Discriminant Analysis (Fisher / Canonical) calculator

When to use it

Use to classify observations into known groups based on multiple continuous predictors and to find the linear combinations of predictors that best separate the groups. Two groups gives Fisher's linear discriminant. Three or more groups gives canonical discriminant axes (the multivariate generalisation). Standard tool in taxonomy, species identification, fraud detection, and any classification setting where group membership is known on a training set.

When NOT to use it

Do not use when within-group covariance matrices are very different across groups; use quadratic discriminant analysis (QDA) or a kernel method instead. Do not use when predictors are mostly categorical; use logistic or multinomial regression. With more predictors than observations, classical LDA is unstable; use regularised LDA. For exploratory dimensionality reduction without group labels, use PCA.

What you get

Per-axis eigenvalues with cumulative percent of separation explained; canonical correlations; Wilks lambda with its F approximation and p as the global test of group separation; standardised and unstandardised discriminant coefficients per axis; group centroids in canonical space; confusion matrix of classification (resubstitution and leave-one-out); per-class classification accuracy.

How to interpret the output

Wilks lambda close to 0 and p well below alpha indicates the predictors separate the groups; lambda close to 1 indicates poor separation. The first canonical axis explains the most between-group variance; subsequent axes explain the residual. Standardised discriminant coefficients indicate which predictors drive the separation. Leave-one-out classification accuracy is a less optimistic estimate than resubstitution; report both.

Common pitfalls

Try it in StatVeda

The Linear Discriminant Analysis (Fisher / Canonical) engine runs entirely in the browser. No signup, no install, no data sent to a server. Paste your data, hit Run, copy the output.

Open Linear Discriminant Analysis (Fisher / Canonical)

References

Related calculators