[This article was first published on NIR-Quimiometria
, and kindly contributed to R-bloggers
]. (You can report issue about the content on this page here
Want to share your content on R-bloggers? click here
if you have a blog, or here
if you don't.
In my last post about “ChemoSpec package” (Hierarchical Cluster Analysis (ChemoSpec) – 02), we saw the two cluster groups (one for olive oil, other for sunflower oil), and also another sub-clusters for the sunflower oil.
Continue reading the manual “ChemoSpec:An R Package for Chemometric Analysis of Spectroscopic Data” by Bryan A. Hanson, I decide to apply the PCA to the oil data.
PCA is a unsupervised discriminate method and it will give me another vision of the clusters.
Lets calculate the PCA for the same data (remember that the spectra is math treated with the second derivative).I will use the option “classical” from the two main options (classical and robust).
If we realize, we have similar information in both plots: One cluster for olive oil (red point to the left) and to the right other sub-clusters (3) for the sunflower oil.
This two PCs explain almost all the variance (99,4%).