plsDA | R Documentation |
Partial Least Squares Discriminant Analysis
PLS regression to discriminate classes (via a logistic model)
basically this is a wrapper for the plsda
function in the caret package,
but with default setup for dealing with uneven classes (via the priors option, see details)
see caret::plsda for implementation details
plsDA(x, grouping, K, usePriors = FALSE, plsfun = caret::plsda, ...)
x |
data with samples in rows, features are columns (not necessarily compositional data) |
grouping |
a numeric vector or factor with sample classes (length should equal |
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.