Discriminant analysis uses samples with known class labels, the training set, to build a rule that assigns new samples to the most likely class. Linear discriminant analysis (LDA) assumes equal covariance matrices across classes and constructs discriminant functions that maximize between-group spread relative to within-group spread, giving linear decision boundaries; quadratic discriminant analysis (QDA) relaxes the equal-covariance assumption. It is commonly used for product grading, fault classification and supplier tier judgment.
Use discriminant analysis when you have labeled historical samples and want to classify new observations or identify which measured variables best separate the groups. It suits product classification, defect and failure type classification, and quality-based supplier grading. The LDA assumptions of multivariate normality and equal covariance should be checked first; when variables are far from normal, consider transforms or methods with looser assumptions such as logistic regression or decision trees.
Prepare data with one column of class labels and several continuous discriminant variables. The tool checks the LDA prerequisites, then runs LDA or QDA with your choice of prior probabilities and outputs the discriminant functions, variable contributions, confusion matrix, cross-validated accuracy and a discriminant score plot. Use the cross-validated accuracy rather than the resubstitution accuracy when judging real predictive power.
LDA maximizes the ratio of between-group to within-group variance; for k classes it extracts up to k - 1 discriminant functions, each explaining a portion of the total variance ordered by eigenvalue. Classification assigns a sample to the class with the highest posterior probability computed from the discriminant scores and priors. The confusion matrix diagonal shows per-class accuracy, and a large gap between resubstitution and cross-validated accuracy signals overfitting.