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.


Class: ClassificationDiscriminant

Classification edge by resubstitution


edge = resubEdge(obj)


edge = resubEdge(obj) returns the classification edge obtained by obj on its training data.

Input Arguments


Discriminant analysis classifier, produced using fitcdiscr.

Output Arguments


Classification edge obtained by resubstituting the training data into the calculation of edge.



The edge is the weighted mean value of the classification margin. The weights are class prior probabilities. If you supply additional weights, those weights are normalized to sum to the prior probabilities in the respective classes, and are then used to compute the weighted average.


The classification margin is the difference between the classification score for the true class and maximal classification score for the false classes.

The classification margin is a column vector with the same number of rows as in the matrix X. A high value of margin indicates a more reliable prediction than a low value.


For discriminant analysis, the score of a classification is the posterior probability of the classification. For the definition of posterior probability in discriminant analysis, see Posterior Probability.


expand all

Estimate the quality of a discriminant analysis classifier for Fisher's iris data by resubstitution.

Load Fisher's iris data set.

load fisheriris

Train a discriminant analysis classifier.

Mdl = fitcdiscr(meas,species);

Compute the resubstitution edge.

redge = resubEdge(Mdl)
redge =


Was this topic helpful?