# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the 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 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'} ```

```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.