
Last chance! 50% off unlimited learning
Sale ends in
Function to plot performance criteria, such as classification error rate or balanced error rate on a tune.splsda result.
# S3 method for tune.splsda
plot(x, optimal = TRUE, sd = TRUE, legend.position = "topright", col, …)
an tune.splsda
object.
If TRUE, highlights the optimal keepX per component
If 'nrepeat' was used in the call to 'tune.splsda', error bar shows the standard deviation if sd=TRUE
position of the legend, one of "bottomright", "bottom", "bottomleft", -"left", "topleft", "top", "topright", "right" and "center".
character (or symbol) color to be used, possibly vector. One color per component.
Further arguments sent to xyplot
function.
plot.tune.splsda
plots the classification error rate or the balanced error rate from x$error.rate, for each component of the model.
A circle highlights the optimal number of variables oneach component.
tune.mint.splsda
, tune.splsda
and http://www.mixOmics.org for more details.
# NOT RUN {
## validation for objects of class 'splsda'
# }
# NOT RUN {
data(breast.tumors)
X = breast.tumors$gene.exp
Y = as.factor(breast.tumors$sample$treatment)
out = tune.splsda(X, Y, ncomp = 3, nrepeat = 2, logratio = "none",
test.keepX = c(5, 10, 15), folds = 10, dist = "max.dist",
progressBar = TRUE)
plot(out)
# }
# NOT RUN {
## validation for objects of class 'mint.splsda'
# }
# NOT RUN {
data(stemcells)
data = stemcells$gene
type.id = stemcells$celltype
exp = stemcells$study
out = tune(method="mint.splsda", X=data,Y=type.id, ncomp=2, study=exp, test.keepX=seq(1,10,1))
out$choice.keepX.constraint
plot(out)
# }
Run the code above in your browser using DataLab