We can use also LOCAL in R with the Resemble package. I am testing the package these days with a set of petfood spectra (with protein reference values) imported from Win ISI with SNV and a second derivative math treatment. After, I select 65% for training and the rest for test.
The get predictions process of Resemble allow a configuration to check for the better number of sample or factors for the better prediction, so there are a lot of options and functions to check in this package.
This is a plot of the results for a standard configuration from the reference manual, that I would try to go more deep into, trying to find the best configuration.
ctrl <- mblControl(sm = "pls",
pcSelection = list("opc", 40),
valMethod = c("NNv"),
scaled = FALSE, center = TRUE)
ex1 <- mbl(Yr = Yr, Xr = Xr, Yu = NULL, Xu = Xu,
mblCtrl = ctrl,
distUsage = "predictors",
k = seq(30, 150, 15),
method = "wapls1",
pls.c= c(7, 20))
Clearly seems that some of the configurations have overfitting, but I am just starting to learn the package so more post will come up giving my progress with this package.