Main Content

resubMargin

Class: ClassificationTree

Classification margins by resubstitution

Syntax

M = resubMargin(tree)

Description

M = resubMargin(tree) returns resubstitution classification margins for tree.

Input Arguments

tree

A classification tree created by fitctree.

Output Arguments

M

A numeric column-vector of length size(tree.X,1) containing the classification margins.

Examples

Find the margins for a classification tree for the Fisher iris data by resubstitution. Examine several entries:

load fisheriris
tree = fitctree(meas,species);
M = resubMargin(tree);
M(1:25:end)
ans =
    1.0000
    1.0000
    1.0000
    1.0000
    0.9565
    0.9565

More About

expand all

Extended Capabilities