24 jul. 2014

SNV and Detrend (Shootout 2002 NIR with R)

I want to say “thanks” to Aoife Gowen (@eefieg) for the references, in her last article to this blog. The article is the part 4 of a series called “NIR hyperspectral image analysis using R” and the title of this article is: "Pretreatments and partial least square discriminant analysis". (NIR News Vol.25 Nº 5 August 2014).
Lately I am playing with the Shootout 2002 data so we can summarize on this data things that we have seen before in the blog.
In the last post, I was using the raw spectra and that is not (in some cases) the best way to develop a calibration. So we treat the raw spectra with math treatments to improve the correlation of the spectra with the reference values, and to make more transferable calibrations. If we use a correct math-treatment the regressions will use less terms, and will improve the statistics, and the transferability.
Now I write the script used to treat the matrix X1 (training spectra matrix in Instrument 1):

 + main="Raw Spectra")
#Applying "SNV" to the Shootout 2012 Data>X1_snv<-scale(t(nir.training1$X),center=TRUE,scale=TRUE)
 + xlab="Wavelength (nm)",ylab="1/R",lty=1,
 + col=2,main="SNV math_treat")
#Applying "Detrend" to the Shootout 2012 Data
 +main="Detrend math_treat")
#Combining SNV with Detrend
 +main=" SNV+Detrend math-treat")

As we are writing this script, we see on the Active Graphics Window the spectra , so we can compare them.

These are some of the most familiar anti-scatter math-treatments, apart from others like MSC.


We will continue with this type of exercises in the next posts.

No hay comentarios:

Publicar un comentario