ClassificationDiscriminant class
Superclasses: CompactClassificationDiscriminant
Discriminant analysis classification
Description
A ClassificationDiscriminant
object encapsulates a discriminant analysis classifier, which is a Gaussian mixture model for data generation. A ClassificationDiscriminant
object can predict responses for new data using the predict
method. The object contains the data used for training, so can compute resubstitution predictions.
Construction
Create a ClassificationDiscriminant
object by using fitcdiscr
.
Properties



Categorical predictor indices, which is always empty ( 

List of the elements in the training data 

The equation of the boundary between class
where If 

Square matrix, where Change a 

Value of the Delta threshold for a linear discriminant model,
a nonnegative scalar. If a coefficient of
Change 

Row vector of length equal to the number of predictors in If 

Character vector specifying the discriminant type. One of:
Change You can change between linear types, or between quadratic types, but cannot change between linear and quadratic types. 

Value of the Gamma regularization parameter, a scalar from


Description of the crossvalidation optimization of hyperparameters,
stored as a


Logarithm of the determinant of the withinclass covariance
matrix. The type of


Nonnegative scalar, the minimal value of the Gamma parameter
so that the correlation matrix is invertible. If the correlation matrix
is not singular, 

Parameters used in training 

Class means, specified as a 

Number of observations in the training data, a numeric scalar. 

Cell array of names for the predictor variables, in the order
in which they appear in the training data 

Numeric vector of prior probabilities for each class. The order
of the elements of Add or change a 

Character vector describing the response variable 

Rows of the original training data stored in the model, specified as a
logical vector. This property is empty if all rows are stored in


Character vector representing a builtin transformation function, or a function handle for
transforming scores. Implement dot notation to add or change a


Withinclass covariance matrix or matrices. The dimensions depend
on


Scaled 

Matrix of predictor values. Each column of 

where 

A categorical array, cell array of character vectors, character array, logical vector, or a numeric vector with the same number of rows as 
Object Functions
compact  Reduce size of discriminant analysis classifier 
compareHoldout  Compare accuracies of two classification models using new data 
crossval  Crossvalidate discriminant analysis classifier 
cvshrink  Crossvalidate regularization of linear discriminant 
edge  Classification edge for discriminant analysis classifier 
lime  Local interpretable modelagnostic explanations (LIME) 
logp  Log unconditional probability density for discriminant analysis classifier 
loss  Classification error for discriminant analysis classifier 
mahal  Mahalanobis distance to class means of discriminant analysis classifier 
margin  Classification margins for discriminant analysis classifier 
nLinearCoeffs  Number of nonzero linear coefficients in discriminant analysis classifier 
partialDependence  Compute partial dependence 
plotPartialDependence  Create partial dependence plot (PDP) and individual conditional expectation (ICE) plots 
predict  Predict labels using discriminant analysis classifier 
resubEdge  Resubstitution classification edge for discriminant analysis classifier 
resubLoss  Resubstitution classification loss for discriminant analysis classifier 
resubMargin  Resubstitution classification margins for discriminant analysis classifier 
resubPredict  Predict resubstitution labels of discriminant analysis classification model 
shapley  Shapley values 
testckfold  Compare accuracies of two classification models by repeated crossvalidation 
Copy Semantics
Value. To learn how value classes affect copy operations, see Copying Objects.
Examples
More About
References
[1] Guo, Y., T. Hastie, and R. Tibshirani. "Regularized linear discriminant analysis and its application in microarrays." Biostatistics, Vol. 8, No. 1, pp. 86–100, 2007.