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%).
To leave a comment
for the author, please follow the link and comment on his blog: NIR-Quimiometria
offers daily e-mail updates
news and tutorials
on topics such as: visualization (ggplot2
), programming (RStudio
, Web Scraping
) statistics (regression
, time series
) and more...
If you got this far, why not subscribe for updates
from the site? Choose your flavor: e-mail
, or facebook