Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Discriminant Analysis Classification

Discriminant analysis is a classification method. It assumes that different classes generate data based on different Gaussian distributions.

Linear discriminant analysis is also known as the Fisher discriminant, named for its inventor, Sir R. A. Fisher [1].

Create Discriminant Analysis Classifiers

This example shows how to train a basic discriminant analysis classifier to classify irises in Fisher's iris data.

Load the data.

load fisheriris

Create a default (linear) discriminant analysis classifier.

MdlLinear = fitcdiscr(meas,species);

To visualize the classification boundaries of a 2-D linear classification of the data, see Create and Visualize Discriminant Analysis Classifier.

Classify an iris with average measurements.

meanmeas = mean(meas);
meanclass = predict(MdlLinear,meanmeas)
meanclass =

  1x1 cell array

    {'versicolor'}

Create a quadratic classifier.

MdlQuadratic = fitcdiscr(meas,species,'DiscrimType','quadratic');

To visualize the classification boundaries of a 2-D quadratic classification of the data, see Create and Visualize Discriminant Analysis Classifier.

Classify an iris with average measurements using the quadratic classifier.

meanclass2 = predict(MdlQuadratic,meanmeas)
meanclass2 =

  1x1 cell array

    {'versicolor'}

References

[1] Fisher, R. A. The Use of Multiple Measurements in Taxonomic Problems. Annals of Eugenics, Vol. 7, pp. 179–188, 1936. Available at http://digital.library.adelaide.edu.au/dspace/handle/2440/15227.

See Also

Functions

Using Objects

Related Topics

Was this topic helpful?