Måge plot for SO-PLS (sopls
) cross-validation visualisation.
maage(
object,
expl_var = TRUE,
pure.trace = FALSE,
pch = 20,
xlab = "# components",
ylab = ifelse(expl_var, "Explained variance (%)", "RMSECV"),
xlim = NULL,
ylim = NULL,
cex.text = 0.8,
...
)
maageSeq(
object,
compSeq = TRUE,
expl_var = TRUE,
pch = 20,
xlab = "# components",
ylab = ifelse(expl_var, "Explained variance (%)", "RMSECV"),
xlim = NULL,
ylim = NULL,
cex.text = 0.8,
col = "gray",
col.block = c("red", "blue", "darkgreen", "purple", "black", "red", "blue",
"darkgreen"),
...
)
An SO-PLS model (sopls
object)
Logical indicating if explained variance (default) or RMSECV should be displayed.
Logical indicating if single block solutions should be traced in the plot.
Scalar or symbol giving plot symbol.
Label for x-axis.
Label for y-axis.
Plot limits for x-axis (numeric vector).
Plot limits for y-axis (numeric vector).
Text scaling (scalar) for better readability of plots.
Additional arguments to plot
.
Integer vector giving the sequence of previous components chosen for maageSeq
(see example).
Line colour in plot.
Line colours for blocks (default = c('red','blue','darkgreen','purple','black'))
The maage
plot has no return.
This function can either be used
for global optimisation across blocks or sequential optimisation, using maageSeq
.
The examples below show typical usage.
Overviews of available methods, multiblock
, and methods organised by main structure: basic
, unsupervised
, asca
, supervised
and complex
.
data(wine)
ncomp <- unlist(lapply(wine, ncol))[-5]
so.wine <- sopls(`Global quality` ~ ., data=wine, ncomp=ncomp,
max_comps=10, validation="CV", segments=10)
maage(so.wine)
# Sequential search for optimal number of components per block
old.par <- par(mfrow=c(2,2), mar=c(3,3,0.5,1), mgp=c(2,0.7,0))
maageSeq(so.wine)
maageSeq(so.wine, 2)
maageSeq(so.wine, c(2,1))
maageSeq(so.wine, c(2,1,1))
par(old.par)