Class: ClassificationEnsemble

Resume training ensemble


ens1 = resume(ens,nlearn)
ens1 = resume(ens,nlearn,Name,Value)


ens1 = resume(ens,nlearn) trains ens for nlearn more cycles. resume uses the same training options fitensemble used to create ens.

    Note:   You cannot resume training when ens is a Subspace ensemble created with 'AllPredictorCombinations' number of learners.

ens1 = resume(ens,nlearn,Name,Value) trains ens with additional options specified by one or more Name,Value pair arguments.

Input Arguments


A classification ensemble, created with fitensemble.


A positive integer, the number of cycles for additional training of ens.

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.


Printout frequency, a positive integer scalar or 'off' (no printouts). Returns to the command line the number of weak learners trained so far. Useful when you train ensembles with many learners on large data sets.

Default: 'off'

Output Arguments


The classification ensemble ens, augmented with additional training.


Train a classification ensemble for 10 cycles. Examine the resubstitution error. Then train for 10 more cycles and examine the new resubstitution error.

load ionosphere
ens = fitensemble(X,Y,'GentleBoost',10,'Tree');
L = resubLoss(ens)

L =

ens1 = resume(ens,10);
L = resubLoss(ens1)

L =

The new ensemble has much less resubstitution error than the original.

See Also

Was this topic helpful?