Learn R Programming

windows.pls (version 0.1.0)

sel.best.window: 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)

Value

An object containing results of the best model. Has the same content of a model obtained from the function pls of mdatools.

Arguments

wpls,

object obtained from cv.wpls.

Examples

Run this code
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)

Run the code above in your browser using DataLab