Esta página aún no se ha traducido para esta versión. Puede ver la versión más reciente de esta página en inglés.

resume

Resume training ensemble

Sintaxis

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

Description

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

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

Argumentos de entrada

ens

A regression ensemble, created with fitrensemble.

nlearn

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

Argumentos de par nombre-valor

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

'nprint'

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.

Predeterminado: 'off'

Output Arguments

ens1

The regression ensemble ens, augmented with additional training.

Ejemplos

expandir todo

Train a regression ensemble for 50 cycles, and compare the resubstitution error obtained after training the ensemble for more cycles.

Load the carsmall data set and select displacement, horsepower, and vehicle weight as predictors.

load carsmall
X = [Displacement Horsepower Weight];

Train a regression ensemble for 50 cycles and examine the resubstitution error.

ens = fitrensemble(X,MPG,'NumLearningCycles',50);
L = resubLoss(ens)
L = 0.5563

Train for 50 more cycles and examine the new resubstitution error.

ens = resume(ens,50);
L = resubLoss(ens)
L = 0.3463

The resubstitution error is lower in the new ensemble than in the original.

Consulte también