Main Content

Discriminant Analysis

Regularized linear and quadratic discriminant analysis

To interactively train a discriminant analysis model, use the Classification Learner app. For greater flexibility, train a discriminant analysis model using fitcdiscr in the command-line interface. After training, predict labels or estimate posterior probabilities by passing the model and predictor data to predict.

Apps

Classification LearnerTrain models to classify data using supervised machine learning

Functions

expand all

fitcdiscrFit discriminant analysis classifier
makecdiscrConstruct discriminant analysis classifier from parameters
compactReduce size of discriminant analysis classifier
cvshrinkCross-validate regularization of linear discriminant
limeLocal interpretable model-agnostic explanations (LIME) (Since R2020b)
partialDependenceCompute partial dependence (Since R2020b)
plotPartialDependenceCreate partial dependence plot (PDP) and individual conditional expectation (ICE) plots
shapleyShapley values (Since R2021a)
crossvalCross-validate discriminant analysis classifier
kfoldEdgeClassification edge for cross-validated classification model
kfoldLossClassification loss for cross-validated classification model
kfoldfunCross-validate function for classification
kfoldMarginClassification margins for cross-validated classification model
kfoldPredictClassify observations in cross-validated classification model
lossClassification error for discriminant analysis classifier
resubLossResubstitution classification loss for discriminant analysis classifier
logpLog unconditional probability density for discriminant analysis classifier
mahalMahalanobis distance to class means of discriminant analysis classifier
nLinearCoeffsNumber of nonzero linear coefficients in discriminant analysis classifier
compareHoldoutCompare accuracies of two classification models using new data
edgeClassification edge for discriminant analysis classifier
marginClassification margins for discriminant analysis classifier
resubEdgeResubstitution classification edge for discriminant analysis classifier
resubMarginResubstitution classification margins for discriminant analysis classifier
testckfoldCompare accuracies of two classification models by repeated cross-validation
predictPredict labels using discriminant analysis classifier
resubPredictPredict resubstitution labels of discriminant analysis classification model
classifyClassify observations using discriminant analysis

Classes

ClassificationDiscriminantDiscriminant analysis classification
CompactClassificationDiscriminantCompact discriminant analysis class
ClassificationPartitionedModelCross-validated classification model

Topics