Description Usage Arguments Details Author(s) See Also Examples
Function to plot performance criteria, such as classification error rate or balanced error rate on a tune.splsda result.
1 2 3 4 5 6 7 |
x |
an |
optimal |
If TRUE, highlights the optimal keepX per component |
sd |
If 'nrepeat' was used in the call to 'tune.splsda', error bar shows the standard deviation if sd=TRUE |
legend.position |
position of the legend, one of "bottomright", "bottom", "bottomleft", -"left", "topleft", "top", "topright", "right" and "center". |
col |
character (or symbol) color to be used, possibly vector. One color per component. |
... |
Further arguments sent to |
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.
plot.tune.block.splsda
plots the classification error rate or the balanced error rate from x$error.rate, for each component of the model. The error rate is ordered by increasing value, the yaxis shows the optimal combination of keepX at the top (e.g. ‘keepX on block 1’_‘keepX on block 2’_‘keepX on block 3’)
plot.tune.spls
plots the tuning results for the measure of accuracy x$measure
, for each component of the model and any tested keepX
parameters when Y is fixed (contact us for more details).
Kim-Anh Lê Cao, Florian Rohart, Francois Bartolo.
tune.mint.splsda
, tune.splsda
tune.block.splsda
and http://www.mixOmics.org for more details.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | ## 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)
## End(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
plot(out)
## End(Not run)
## validation for objects of class 'mint.splsda'
## Not run:
data("breast.TCGA")
# this is the X data as a list of mRNA and miRNA; the Y data set is a single data set of proteins
data = list(mrna = breast.TCGA$data.train$mrna, mirna = breast.TCGA$data.train$mirna,
protein = breast.TCGA$data.train$protein)
# set up a full design where every block is connected
# could also consider other weights, see our mixOmics manuscript
design = matrix(1, ncol = length(data), nrow = length(data),
dimnames = list(names(data), names(data)))
diag(design) = 0
design
# set number of component per data set
ncomp = 5
# Tuning the first two components
# -------------
# definition of the keepX value to be tested for each block mRNA miRNA and protein
# names of test.keepX must match the names of 'data'
test.keepX = list(mrna = seq(10,40,20), mirna = seq(10,30,10), protein = seq(1,10,5))
# the following may take some time to run, note that for through tuning
# nrepeat should be > 1
tune = tune.block.splsda(X = data, Y = breast.TCGA$data.train$subtype,
ncomp = ncomp, test.keepX = test.keepX, design = design, nrepeat = 3)
tune$choice.ncomp
tune$choice.keepX
plot(tune)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.