Перейти к основному содержимому

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 (K−1)(K-1)-dimensional space of the PLS predictions, where every class kk has a centre ckc_k, and the squared Mahalanobis distance dk(t)=(t−ck)⊤S−1(t−ck)d_k(t) = (t - c_k)^\top S^{-1} (t - c_k) from a sample tt to each centre is computed. The rules differ in the covariance matrix SS 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 kk if dk(t)<χ1−α2(K−1),d_k(t) < \chi^2_{1-\alpha}(K - 1), the (1−α)(1-\alpha) quantile of the chi-squared distribution with K−1K-1 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​

α (Significance Level) is the share of samples of a class that you accept to lose: the probability that a genuine member of class kk falls outside its acceptance area. With α=0.05\alpha = 0.05 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.

In the full method of Pomerantsev & Rodionova, a second parameter γ defines a larger outer boundary beyond which a training sample is treated as an outlier. Chrometrica does not implement this step yet, and the dialog has no γ field.

What this means in Chrometrica​

QuestionRuleSettings
Which of my classes is this sample? All samples belong to one of them.HardClassification Style = Hard
Is this sample one of my classes, and which one? Foreign samples are possible.SoftClassification 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