Computes the maximum likelihood estimators (MLEs) for each class under the assumption of multivariate normality for each class. Also, computes ancillary information necessary for classifier summary, such as sample size, the number of features, etc.
Matrix or data frame containing the training data. The rows are the sample observations, and the columns are the features. Only complete data are retained.
vector of class labels for each training observation
logical. Should the sample covariance matrices be computed? (Default: yes)
vector with prior probabilities for each class. If NULL (default), then the sample proportions are used. See details.
This function computes the common estimates and ancillary information used in
all of the regularized discriminant classifiers in the
The matrix of training observations are given in
x. The rows of
contain the sample observations, and the columns contain the features for each
The vector of class labels given in
y are coerced to a
The length of
y should match the number of rows in
An error is thrown if a given class has less than 2 observations because the variance for each feature within a class cannot be estimated with less than 2 observations.
prior, contains the a priori class membership for
each class. If
prior is NULL (default), the class membership
probabilities are estimated as the sample proportion of observations belonging
to each class. Otherwise,
prior should be a vector with the same length
as the number of classes in
prior probabilities should be
nonnegative and sum to one.
named list with estimators for each class and necessary ancillary information
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.