I am working on a software that does SIMCA using mahalanobis distances with the following steps(excluding the classification of new objects for simplicity):
- Center each class individually
- Apply PCA to each class
- Find the optimal number of PCs for each class
- Calculate the mahalanobis distance of each sample to each class
- Display Coomans plot
The problem: Most of the times, I am ending up with different number PCs for each class(step 3) and it doesn't allow me to calculate mahalanobis distances since the dimensions doesn't match in this case. I am currently using the minimum of that numbers which leads to nonsense results even though the data is "good".
What is the proper way of handling this issue? Or am I doing something else wrong?
Note: The paper on the subject referenced from articles that uses SIMCA and Coomans plot is missing from online libraries including the original publisher: "Potential pattern recognition in chemical and medical decision making (D. Coomans and I. Broeckaert)"
Thus, I am also looking for a resource which explains this method step by step.