
Last chance! 50% off unlimited learning
Sale ends in
Function to plot performance criteria, such as MSEP, RMSEP,
# S3 method for perf.spls.mthd
plot(x,
criterion = "MSEP",
xlab = "number of components",
ylab = NULL,
LimQ2 = 0.0975,
LimQ2.col = "darkgrey",
cTicks = NULL,
layout = NULL,
…)# S3 method for perf.splsda.mthd
plot(x,
dist = c("all","max.dist","centroids.dist","mahalanobis.dist"),
measure = c("all","overall","BER"),
col,
xlab = NULL,
ylab = NULL,
overlay=c("all", "measure", "dist"),
legend.position=c("vertical", "horizontal"),
sd = TRUE,
…)
# S3 method for perf.mint.splsda.mthd
plot(x,
dist = c("all","max.dist","centroids.dist","mahalanobis.dist"),
measure = c("all","overall","BER"),
col,
xlab = NULL,
ylab = NULL,
study = "global",
overlay= c("all", "measure", "dist"),
legend.position=c("vertical", "horizontal"),
…)
# S3 method for perf.sgccda.mthd
plot(x,
dist = c("all","max.dist","centroids.dist","mahalanobis.dist"),
measure = c("all","overall","BER"),
col,
weighted = TRUE,
xlab = NULL,
ylab = NULL,
overlay= c("all", "measure", "dist"),
legend.position=c("vertical","horizontal"),
sd = TRUE,
…)
an perf
object.
character string. What type of validation criterion to plot for
pls
or spls
. One of "MSEP"
, "RMSEP"
, "R2"
or "Q2"
.
See perf
.
prediction method applied in perf
for plsda
or splsda
.
See perf
.
Two misclassification measure are available: overall misclassification error overall
or the Balanced Error Rate BER
character (or symbol) color to be used, possibly vector. One color per distance dist
.
plot either the performance of the Majority vote or the Weighted vote.
Indicates which study-specific outputs to plot. A character vector containing some levels of object$study
, "all.partial" to plot all studies or "global" is expected. Default to "global".
parameter to overlay graphs; if 'all', only one graph is shown with all outputs; if 'measure', a graph is shown per distance; if 'dist', a graph is shown per measure.
position of the legend, one of "vertical" (only one column) or "horizontal" (two columns).
titles for expression(R^2)
).
numeric value. Signification limit for the components in the model.
Default is LimQ2 = 0.0975
.
character string specifying the color for the LimQ2
line to be plotted.
If "none"
the line will not be plotted.
integer vector. Axis tickmark locations for the used number of components.
Default is 1:ncomp
(see perf
).
numeric vector of length two giving the number of rows and columns in a
multi panel display. If not specified, plot.perf
tries to be intelligent.
If 'nrepeat' was used in the call to 'perf', error bar shows the standard deviation if sd=TRUE
Further arguments sent to xyplot
function.
plot.perf
creates one plot for each response variable in the
model, laid out in a multi panel display. It uses xyplot
for
performing the actual plotting.
More details about the prediction distances in ?predict
and the referred publication.
Rohart F, Gautier B, Singh A, Le Cao K-A. mixOmics: an R package for 'omics feature selection and multiple data integration.
# NOT RUN {
require(lattice)
## validation for objects of class 'pls' or 'spls'
# }
# NOT RUN {
data(liver.toxicity)
X <- liver.toxicity$gene
Y <- liver.toxicity$clinic
liver.pls <- pls(X, Y, ncomp = 3)
liver.perf <- perf(liver.pls, validation = "Mfold")
plot(liver.perf, criterion = "R2", layout = c(2, 2))
# }
# NOT RUN {
## validation for objects of class 'plsda' or 'splsda'
# }
# NOT RUN {
data(breast.tumors)
X <- breast.tumors$gene.exp
# Y will be transformed as a factor in the function,
# but we set it as a factor to set up the colors.
Y <- as.factor(breast.tumors$sample$treatment)
res <- splsda(X, Y, ncomp = 2, keepX = c(25, 25))
breast.perf <- perf(res, nrepeat = 5)
plot(breast.perf)
plot(breast.perf, col=1:3)
plot(breast.perf, col=1:3, sd=FALSE)
# }
Run the code above in your browser using DataLab