Description Usage Arguments Details Value Author(s) References See Also
Two examples of functions that can be used in variable selection for classification. The outcome of these functions should be maximized by the optimization.
1 2 |
x |
Data matrix: independent variables used by |
grouping |
Class vector, possibly a factor |
response |
Dependent variable, typically a real number |
subset |
A vector containing the indices of the variables to be included |
... |
Further arguments, such as the number of latent
variables to use in |
The evaluation function should give high values for good
subsets, and low values for bad subsets. The lda.loofun
function simply counts the number of correct predictions in LOO
crossvalidation, and subtracts the number of variables in the
subset. Function pls.cvfun
returns the mean squared error of
cross-validation.
One value indicating the quality of the subset
Ron Wehrens
R. Wehrens. "Chemometrics with R - Multivariate Data Analysis in the Natural Sciences and Life Sciences". Springer, Heidelberg, 2011.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.