Measure class separation from laboratory feature data. Review coefficients, centroids, priors, distances, and predictions instantly. Use examples, exports, formulas, and graphs for interpretation today.
Rows are samples. Columns are features. The same values are preloaded in the form for quick testing.
| Sample | Class | Absorbance 450nm | Conductivity | Density |
|---|---|---|---|---|
| 1 | Reference Batch | 0.82 | 12.4 | 1.018 |
| 2 | Reference Batch | 0.79 | 12.1 | 1.021 |
| 3 | Reference Batch | 0.85 | 12.7 | 1.017 |
| 4 | Reference Batch | 0.81 | 12.3 | 1.019 |
| 5 | Reference Batch | 0.84 | 12.6 | 1.020 |
| 6 | Test Batch | 0.61 | 10.8 | 0.998 |
| 7 | Test Batch | 0.58 | 10.5 | 1.001 |
| 8 | Test Batch | 0.64 | 11.0 | 0.997 |
| 9 | Test Batch | 0.60 | 10.7 | 0.999 |
| 10 | Test Batch | 0.63 | 10.9 | 1.000 |
Suggested unknown sample: 0.74, 11.7, 1.011
μk = (1 / nk) Σ xi
Σp = [ (n1 - 1)S1 + (n2 - 1)S2 ] / (n1 + n2 - 2)
Σreg = Σp + λI
w = Σreg-1(μ1 - μ2)
g(x) = wTx - 0.5μ1TΣreg-1μ1 + 0.5μ2TΣreg-1μ2 + ln(π1/π2)
In this calculator, a score of zero is the decision boundary. Positive values classify toward Class 1, while negative values classify toward Class 2.
It separates two chemical groups using measured variables such as absorbance, conductivity, density, retention time, or concentration. The calculator builds one discriminant axis, scores each sample, predicts an unknown, and reports coefficients, centroids, and pooled covariance.
You can enter any consistent number of variables, as long as every row contains the same count. More variables usually need more samples. If inversion becomes unstable, increase the regularization value slightly.
LDA needs within-class variation to estimate covariance. With only one sample, the class spread cannot be measured properly, so the pooled covariance matrix and decision boundary become unreliable.
Regularization adds a small value to diagonal covariance terms. This reduces numerical instability when features are highly correlated, nearly duplicated, or when the sample size is small relative to the number of variables.
Priors shift the classification boundary toward the less likely class and favor the more likely class. Use them when one chemistry class is expected to occur more often before you inspect the measurements.
A positive score means the sample lies on the Class 1 side of the LDA boundary. A negative score means it lies on the Class 2 side. Larger magnitudes imply stronger separation from the boundary.
Yes, but think carefully about scale. Very large-unit variables can dominate the model. If measurements span very different magnitudes, standardizing outside the calculator may improve interpretation and balance.
Avoid LDA when class boundaries are strongly nonlinear, covariance structures differ greatly, outliers dominate the data, or the dataset is tiny compared with the number of variables. In those cases, another classifier may perform better.
Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.