Hard vs soft PLS-DA
PLS-DA can end with two different decision rules. The hard rule always answers with one of the known classes. The soft rule can answer "this class", "one of these classes" or "none of them". Which one is right depends on the question: which of these classes is it? or is it one of these classes at all?
Both rules start from the same place: the samples are projected into the -dimensional space of the PLS predictions, where every class has a centre , and the squared Mahalanobis distance from a sample to each centre is computed. The rules differ in the covariance matrix and in what they do with the distances.
Hard PLS-DA
- One covariance for all classes: the spread of all training samples in the projected space.
- Rule: the sample goes to the class with the smallest distance.
- Result: exactly one class per sample, always. The space is divided into regions by straight boundaries, like in LDA.
The hard rule is a discrimination method. It is the right choice when every sample you will classify belongs to one of the training classes (for example, five known grades of a product and nothing else).
Soft PLS-DA
- One covariance per class: the scatter of the samples of that class around its centre. A tight class gets a small acceptance area, a variable class a large one.
- Rule: a sample is accepted by class if the quantile of the chi-squared distribution with degrees of freedom. The acceptance area of each class is an ellipse (an ellipsoid for more classes) around its centre.
- Result: a sample can be accepted by one class, by several (overlapping areas), or by none.
The soft rule is a class-modelling (authentication) method: it can reject a sample that looks like none of the known classes, for example a counterfeit or a contaminated sample.
How Chrometrica reports soft results:
- accepted by several classes: the closest class is reported;
- accepted by none: the sample is not assigned and reported as
UNKNOWN. It counts as an error in accuracy.
Choosing alpha and gamma
α (Significance Level) is the share of samples of a class that you accept to lose: the probability that a genuine member of class falls outside its acceptance area. With about 5 % of genuine samples are expected to be rejected.
- Smaller α → larger areas → fewer genuine samples rejected, but more foreign samples accepted.
- Larger α → tighter areas → foreign samples are rejected more reliably, but
more genuine samples are lost as
UNKNOWN.
α matters only for the soft rule.
γ (Outlier Threshold) in the method of Pomerantsev & Rodionova defines a second, larger boundary beyond which a training sample is treated as an outlier. In the current version of Chrometrica, γ is stored with the model but not used: there is no separate outlier step.
What this means in Chrometrica
| Question | Rule | Settings |
|---|---|---|
| Which of my classes is this sample? All samples belong to one of them. | Hard | Classification Style = Hard |
| Is this sample one of my classes, and which one? Foreign samples are possible. | Soft | Classification Style = Soft, choose Significance Level (α) |
When you compare the two, remember that the soft rule's accuracy counts
UNKNOWN as wrong: its accuracy is usually lower, even when it behaves
exactly as intended.
Further reading
- Pomerantsev A. L., Rodionova O. Ye. Multiclass partial least squares discriminant analysis: taking the right way — a critical tutorial. Journal of Chemometrics, 32, e3030 (2018). doi:10.1002/cem.3030
- Rodionova O. Ye., Titova A. V., Pomerantsev A. L. Discriminant analysis is an inappropriate method of authentication. TrAC Trends in Analytical Chemistry, 78, 17–22 (2016). doi:10.1016/j.trac.2016.01.010