map.best.window {windows.pls} | R Documentation |
Plots spectra highlighting windows with the best performance.
Description
Plots spectra highlighting windows with the best performance.
Usage
map.best.window(
wpls = NULL,
fade = 0.7,
col.window = "steelblue",
xlab = "Wavelengths",
ylab = "Absorbance",
title = NULL,
legend = NULL
)
Arguments
wpls |
object obtained from cv.wpls. |
fade |
opacity of the window. |
col.window |
color of the window that highlights the region. |
xlab |
title of the x axis. |
ylab |
title of the y axis. |
title |
title of the plot. |
legend |
description description |
Value
Plot of the spectra with a window that highlights the region with the lowest cross-validation error.
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)
map.best.window(mywpls)
[Package windows.pls version 0.1.0 Index]