Plot PLS-DA classification performance using different components, permutation
Source:R/metabolomics_plots.R
met.plot_PLS.Permutation.Rd
Permutation test is a technique for testing a hypothesis of no effect, when the distribution of the test statistic is unknown. The objective of this test is to confirm that the initial model is superior to other models obtained by permuting the class labels and randomly assigning them to different individuals or, in other words, to answer the question "what is the model's performance if the groups are formed randomly".
Usage
met.plot_PLS.Permutation(
mSetObj = NA,
imgName = "PLSDA-Permutation",
format = "pdf",
dpi = NULL,
width = NA,
plot = TRUE,
export = TRUE,
title = FALSE
)
Arguments
- mSetObj
Input name of the created mSet object. Data container after partial least squares-discriminant analysis (
met.PLSR.Anal
andmet.PLSDA.CV
).- imgName
(Character) Enter a name for the image file (if
export = TRUE
).- format
(Character,
"png"
or"pdf"
) image file format (ifexport = TRUE
).- dpi
(Numeric) resolution of the image file (if
export = TRUE
). IfNULL
, the resolution will be chosen automatically based on the chosen file format (300 dpi for PNG, 72 dpi for PDF)- width
(Numeric) width of the the image file in inches (if
export = TRUE
).- plot
(Logical,
TRUE
orFALSE
) Shall the plot be returned in the RStudio 'Plots' pane?- export
(Logical,
TRUE
orFALSE
) Shall the plot be exported as PDF or PNG file?- title
(Logical)
TRUE
to add a title with the used normalization, transformation, and scaling method, orFALSE
to not add any title.
Value
The input mSet object with added permutation test plot. The plot can be retrieved from within R via print(mSetObj$imgSet$pls.permut.plot)
.
References
adapted from PlotPLS.Permutation
(https://github.com/xia-lab/MetaboAnalystR).
Author
Nicolas T. Wirth mail.nicowirth@gmail.com Technical University of Denmark License: GNU GPL (>= 2)