Read firs the previous tutorials to follow this post:
“ex1” is a list, and one of the values is “pcAnalysis” which is another list containing the scores of the training spectra matrix and the scores of the validation spectra matrix. The scores are standardized, so the variance is one in each principal component.
As we have done in other plots if we have the score matrix we can plot the different planes to check the samples in the PC space select the combinations we prefer, in this plot we represent PC1 vs. PC2:
and we can draw ellipses of radio 1, to see more clearly the distance to the centroid.
Training samples are in blue and validation samples are in red.
This is an example of how to build an ellipse of radio 4: