# Shootout 2012 : first PLS regressions

**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.

I develop a regression (1) with MSC, and I look to the prediction statistics for the test set:**>**Active_reg1<- pls(Active~NIT.msc,ncomp=5,data=shootcalmsc.2012 , validation = “LOO”)**>**RMSEP(Active_reg1,newdata=shoottestmsc.2012)

(Intercept) 1 comps 2 comps 3 comps 4 comps 5 comps

1.1637 0.6944 0.5028 0.4586 0.4913 0.5355

Now the regression (2) with a SG filter (first derivative)**>**Active_reg2<- plsr(Active~NITsg, ncomp =5,data=shootcalsg.2012 , validation = “LOO”)**>**RMSEP(Active_reg2,newdata=shoottestmsc.2012)

(Intercept) 1 comps 2 comps 3 comps 4 comps 5 comps

1.1637 1.0414 0.4172 0.4313 0.4531 0.4556

In case that the SG filter has the second derivative, the RMSEP statistics are:

(Intercept) 1 comps 2 comps 3 comps 4 comps 5 comps

1.1637 0.5506 0.4269 0.4227 0.4134 0.4009

We can have a look to the Predicted vs. Lab plots:**>**predplot(Active_reg1,ncomp=3,newdata=shoottestmsc.2012,asp=1,line=TRUE,main=”MSC math-treatment”)**>**predplot(Active_reg2,ncomp=2,newdata=shoottestsg.2012,asp=1,line=TRUE,main=”SG second der”)

**“Sample Sets” plots (Shootout-2012)**

**Shootout 2012: Test & Val Sets proyections**

**Working with Shootout – 2012 in R (001)**

**Shootout 2012 files**

**leave a comment**for the author, please follow the link and comment on their blog:

**NIR-Quimiometria**.

R-bloggers.com offers

**daily e-mail updates**about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.

Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.