resubEdge
Resubstitution classification edge for discriminant analysis classifier
Syntax
Description
returns the resubstitution classification Classification Edge
(edge
= resubEdge(Mdl
)edge
) for the trained discriminant analysis classifier
Mdl
using the training data stored in Mdl.X
and
the corresponding true class labels stored in Mdl.Y
. The classification
edge is the Classification Margin averaged over the entire
data set.
Examples
Estimate the Resubstitution Edge of Discriminant Analysis Classifiers
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 = 0.9454
Input Arguments
Mdl
— Discriminant analysis classifier
ClassificationDiscriminant
model object
Discriminant analysis classifier, specified as a ClassificationDiscriminant
model object trained with fitcdiscr
.
More About
Classification 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.
Classification Margin
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.
Score
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.
Version History
Introduced in R2011bR2023b: Observations with missing predictor values are used in resubstitution and cross-validation computations
Starting in R2023b, the following classification model object functions use observations with missing predictor values as part of resubstitution ("resub") and cross-validation ("kfold") computations for classification edges, losses, margins, and predictions.
In previous releases, the software omitted observations with missing predictor values from the resubstitution and cross-validation computations.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)