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.

oobEdge

Class: ClassificationBaggedEnsemble

Out-of-bag classification edge

Syntax

edge = oobEdge(ens)
edge = oobEdge(ens,Name,Value)

Description

edge = oobEdge(ens) returns out-of-bag classification edge for ens.

edge = oobEdge(ens,Name,Value) computes classification edge with additional options specified by one or more Name,Value pair arguments. You can specify several name-value pair arguments in any order as Name1,Value1,…,NameN,ValueN.

Input Arguments

ens

A classification bagged ensemble, constructed with fitensemble.

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

'learners'

Indices of weak learners in the ensemble ranging from 1 to ens.NumTrained. oobEdge uses only these learners for calculating loss.

Default: 1:NumTrained

'mode'

Character vector representing the meaning of the output L:

  • 'ensemble'L is a scalar value, the loss for the entire ensemble.

  • 'individual'L is a vector with one element per trained learner.

  • 'cumulative'L is a vector in which element J is obtained by using learners 1:J from the input list of learners.

Default: 'ensemble'

Output Arguments

edge

Classification edge, a weighted average of the classification margin.

Examples

expand all

Load Fisher's iris data set.

load fisheriris

Train an ensemble of 100 bagged classification trees using the entire data set.

rng(1) % For reproducibility
Mdl = fitensemble(meas,species,'Bag',100,'Tree','type','classification');

Estimate the out-of-bag edge.

edge = oobEdge(Mdl)
edge =

    0.8731

Definitions

expand all

Was this topic helpful?