splsDA | R Documentation |
sparse Partial Least Squares Discriminant Analysis
sPLS regression to discriminate classes (via a logistic model)
basically this is a wrapper for the splsda
function in the caret package,
but with default setup for dealing with uneven classes (via the priors option, see details)
see caret::splsda for implementation details
splsDA(x, grouping, eta, K, usePriors = FALSE, ...)
x |
x with samples in rows, features are columns (not necessarily compositional x) |
grouping |
a numeric vector or factor with sample classes (length should equal |
eta |
parameter that adjusts sparsity of the PLS model (between 0 and 1) |
K |
number of components in the PLS model (default: number of classes - 1) |
usePriors |
use priors for very biased sample size between groups (ie - put strong penalty on misclassifying small groups) |
run this code if you don't need to fit paramaters by cross-validation
a plsda fitted model
plsDA_main
, caret::plsda
, caret::splsda
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.