Documentation

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.

resubMargin

Class: ClassificationDiscriminant

Classification margins by resubstitution

Syntax

M = resubMargin(obj)

Description

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

Input Arguments

obj

Discriminant analysis classifier, produced using fitcdiscr.

Output Arguments

M

Numeric column-vector of length size(obj.X,1) containing the classification margins.

Examples

expand all

Find the margins for a discriminant analysis classifier for Fisher's iris data by resubstitution. Examine several entries.

Load Fisher's iris data set.

load fisheriris

Train a discriminant analysis classifier.

Mdl = fitcdiscr(meas,species);

Compute the resubstitution margins, and display several of them.

m = resubMargin(Mdl);
m(1:25:end)
ans =

    1.0000
    1.0000
    0.9998
    0.9998
    1.0000
    0.9946

Definitions

expand all

Was this topic helpful?