Discriminant Analysis Classification

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

  • To train (create) a classifier, the fitting function estimates the parameters of a Gaussian distribution for each class.

  • To predict the classes of new data, the trained classifier finds the class with the smallest misclassification cost .

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.

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.

Classify an iris with average measurements using the quadratic classifier.

meanclass2 = predict(MdlQuadratic,meanmeas)
meanclass2 = 1x1 cell array
    {'versicolor'}

 
 

 

Matlabsolutions.com provides guaranteed satisfaction with a commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been empanelled after extensive research and quality check.

Matlabsolutions.com provides undivided attention to each Matlab assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work done at the best price in industry.