Main Content

resubEdge

Resubstitution classification edge for classification tree model

Description

example

edge = resubEdge(tree) returns the resubstitution classification edge (edge) for the trained classification tree model tree using the training data stored in tree.X and the corresponding true class labels stored in tree.Y. The classification edge is a numeric scalar value that represents the margin averaged over the entire data set, and is returned as a numeric scalar.

Examples

collapse all

Estimate the quality of a classification tree for the Fisher iris data by resubstitution.

load fisheriris
tree = fitctree(meas,species);
redge = resubEdge(tree)
redge =
    0.9384

Input Arguments

collapse all

Classification tree model, specified as a ClassificationTree model object trained with fitctree.

More About

collapse all

Edge

The edge is the weighted mean value of the classification margin. The weights are the class probabilities in tree.Prior.

Margin

The classification margin is the difference between the classification score for the true class and maximal classification score for the false classes. Margin is a column vector with the same number of rows as in the matrix X.

Score (tree)

For trees, the score of a classification of a leaf node is the posterior probability of the classification at that node. The posterior probability of the classification at a node is the number of training sequences that lead to that node with the classification, divided by the number of training sequences that lead to that node.

For an example, see Posterior Probability Definition for Classification Tree.

Extended Capabilities

Version History

Introduced in R2011a