20/10/2012

PCA with "ChemoSpec" - 001

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.
Let´s have a look first to the HCA plot from (Hierarchical Cluster Analysis (ChemoSpec) - 02):
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).
>class<-classPCA(oils,choice="noscale")
>plotScores(oils,title="OilsSpectra",class,
+ pcs=c(1,2),ellipse="none",tol=0.01)

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%). 

No hay comentarios:

Publicar un comentario en la entrada