map.best.window: Plots spectra highlighting windows with the best performance.

View source: R/map.best.window.R

map.best.windowR 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)

windows.pls documentation built on Aug. 10, 2023, 1:07 a.m.