Skip to main content
added literature
Source Link
cbeleites
  • 39.6k
  • 4
  • 83
  • 150

bit late to the party, but here we go:

(it is unclear which "it" does not allow you to calculate Mahalanobis distances)

SIMCA models each class individually. Mahalanobis distance in SIMCA refers to the distribution of training cases for the class in question in the PC coordinate system for that class.

Thus, you calculate Mahalanobis distance of points $X$ with respect to class B using class B rotation (loadings') including the number of PCs for that class. The Mahalanobis distance is then calculated against the scores distribution for class B training cases. Both the projected point and the scores use the same principal components (including the same number).

SIMCA Class $B$:

  1. project class B training cases: yields scores $T_{B}^{(ntrainB~x~ncompB)}$ and loadings $P_B^{(ncompB~\times~p)}$
  2. calculate variance-covariance-matrix $S_B^{(ncompB~\times~ncompB)} = \frac{1}{ntrainB - 1} T_B'T_B$

for prediction:

  1. first project: $X_B = X^{(npred~\times~p)} P'^{(p~\times~ncompB)}$,
  2. then calculate Mahalanobis distance $d_B$ of $X_B^{(npred~\times~ncompB)}$ against the class B scores $T_{B}^{(ntrainB~x~ncompB)}$

There is no conflict in the number of variates, it is $ncompB$ for both the prediction case scores as well as the trainings case scores.


As for literature, I don't think the book you refer to is the original publication.
Chapter 33 – Supervised Pattern Recognition (Handbook of Chemometrics and Qualimetrics: Part B, aka blue book) refers to Wold, S. Pattern recognition by means of disjoint principal components models, Pattern Recognition, 8, 127–139 (1976). DOI: 10.1016/0031-3203(76)90014-5

bit late to the party, but here we go:

(it is unclear which "it" does not allow you to calculate Mahalanobis distances)

SIMCA models each class individually. Mahalanobis distance in SIMCA refers to the distribution of training cases for the class in question in the PC coordinate system for that class.

Thus, you calculate Mahalanobis distance of points $X$ with respect to class B using class B rotation (loadings') including the number of PCs for that class. The Mahalanobis distance is then calculated against the scores distribution for class B training cases. Both the projected point and the scores use the same principal components (including the same number).

SIMCA Class $B$:

  1. project class B training cases: yields scores $T_{B}^{(ntrainB~x~ncompB)}$ and loadings $P_B^{(ncompB~\times~p)}$
  2. calculate variance-covariance-matrix $S_B^{(ncompB~\times~ncompB)} = \frac{1}{ntrainB - 1} T_B'T_B$

for prediction:

  1. first project: $X_B = X^{(npred~\times~p)} P'^{(p~\times~ncompB)}$,
  2. then calculate Mahalanobis distance $d_B$ of $X_B^{(npred~\times~ncompB)}$ against the class B scores $T_{B}^{(ntrainB~x~ncompB)}$

There is no conflict in the number of variates, it is $ncompB$ for both the prediction case scores as well as the trainings case scores.

bit late to the party, but here we go:

(it is unclear which "it" does not allow you to calculate Mahalanobis distances)

SIMCA models each class individually. Mahalanobis distance in SIMCA refers to the distribution of training cases for the class in question in the PC coordinate system for that class.

Thus, you calculate Mahalanobis distance of points $X$ with respect to class B using class B rotation (loadings') including the number of PCs for that class. The Mahalanobis distance is then calculated against the scores distribution for class B training cases. Both the projected point and the scores use the same principal components (including the same number).

SIMCA Class $B$:

  1. project class B training cases: yields scores $T_{B}^{(ntrainB~x~ncompB)}$ and loadings $P_B^{(ncompB~\times~p)}$
  2. calculate variance-covariance-matrix $S_B^{(ncompB~\times~ncompB)} = \frac{1}{ntrainB - 1} T_B'T_B$

for prediction:

  1. first project: $X_B = X^{(npred~\times~p)} P'^{(p~\times~ncompB)}$,
  2. then calculate Mahalanobis distance $d_B$ of $X_B^{(npred~\times~ncompB)}$ against the class B scores $T_{B}^{(ntrainB~x~ncompB)}$

There is no conflict in the number of variates, it is $ncompB$ for both the prediction case scores as well as the trainings case scores.


As for literature, I don't think the book you refer to is the original publication.
Chapter 33 – Supervised Pattern Recognition (Handbook of Chemometrics and Qualimetrics: Part B, aka blue book) refers to Wold, S. Pattern recognition by means of disjoint principal components models, Pattern Recognition, 8, 127–139 (1976). DOI: 10.1016/0031-3203(76)90014-5

Source Link
cbeleites
  • 39.6k
  • 4
  • 83
  • 150

bit late to the party, but here we go:

(it is unclear which "it" does not allow you to calculate Mahalanobis distances)

SIMCA models each class individually. Mahalanobis distance in SIMCA refers to the distribution of training cases for the class in question in the PC coordinate system for that class.

Thus, you calculate Mahalanobis distance of points $X$ with respect to class B using class B rotation (loadings') including the number of PCs for that class. The Mahalanobis distance is then calculated against the scores distribution for class B training cases. Both the projected point and the scores use the same principal components (including the same number).

SIMCA Class $B$:

  1. project class B training cases: yields scores $T_{B}^{(ntrainB~x~ncompB)}$ and loadings $P_B^{(ncompB~\times~p)}$
  2. calculate variance-covariance-matrix $S_B^{(ncompB~\times~ncompB)} = \frac{1}{ntrainB - 1} T_B'T_B$

for prediction:

  1. first project: $X_B = X^{(npred~\times~p)} P'^{(p~\times~ncompB)}$,
  2. then calculate Mahalanobis distance $d_B$ of $X_B^{(npred~\times~ncompB)}$ against the class B scores $T_{B}^{(ntrainB~x~ncompB)}$

There is no conflict in the number of variates, it is $ncompB$ for both the prediction case scores as well as the trainings case scores.