sel.best.window {windows.pls} | R Documentation |
Selection of the best window computed with cv.wpls
Description
Takes as input the object containing metrics of the several models computed with cv.wpls and selects the best basing on the lowest RMSE available; then computes PLS and gives as output an object containing results.
Usage
sel.best.window(wpls = NULL)
Arguments
wpls |
object obtained from cv.wpls. |
Value
An object containing results of the best model. Has the same content of a model obtained from the function pls of mdatools.
Examples
data(beer)
conc=beer[,1]
sp=beer[,2:ncol(beer)]
names(sp)=convert.names.wl(1100,2250,2)
conc=unlist(conc)
mywpls=cv.wpls(sp, conc,mode='wpls', windows = 5)
best.pls=sel.best.window(mywpls)
[Package windows.pls version 0.1.0 Index]