mixomics_splsda_optimize: sPLS-DA

Description Usage Arguments Value Examples

View source: R/multivariate.R

Description

A wrapper for fitting an sPLS-DA model using splsda function of the mixOmics package. Automatically evaluates performance with different number of components and different number of features per component, then chooses the optimal number of components and optimal number of features for each component.

Usage

1
2
mixomics_splsda_optimize(object, y, ncomp_max, dist, n_features = c(1:10,
  seq(20, 300, 10)), ...)

Arguments

object

a MetaboSet object

y

character, column name of the grouping variable to predict

ncomp_max

numeric, the maximum number of components to try

dist

the distance metric to use, one of "max.dist", "mahalanobis.dist", "centroids.dist"

n_features

the number of features to try for each component

...

any parameters passed to mixOmics::plsda

Value

an object of class "splsdsa"

Examples

1
2
set.seed(38)
plsda_res <- mixomics_splsda_optimize(merged_sample, dist = "max.dist", y = "Group", ncomp_max = 2)

antonvsdata/amp documentation built on Jan. 8, 2020, 3:15 a.m.