cvshrink
Cross-validate shrinking (pruning) ensemble
Syntax
vals = cvshrink(ens)
[vals,nlearn]
= cvshrink(ens)
[vals,nlearn]
= cvshrink(ens,Name,Value)
Description
returns an vals
= cvshrink(ens
)L
-by-T
matrix with cross-validated
values of the mean squared error. L
is the number of
lambda
values in the ens.Regularization
structure. T
is the number of
threshold
values on weak learner weights. If
ens
does not have a Regularization
property
filled in by the regularize
method, pass a
lambda
name-value pair.
[
returns an vals
,nlearn
]
= cvshrink(ens
)L
-by-T
matrix of the mean number of
learners in the cross-validated ensemble.
[
cross validates with additional options specified by one or more
vals
,nlearn
]
= cvshrink(ens
,Name,Value
)Name,Value
pair arguments. You can specify several name-value
pair arguments in any order as Name1,Value1,…,NameN,ValueN
.
Input Arguments
|
A regression ensemble, created with |
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
|
A partition created with |
|
Holdout validation tests the specified fraction of the data,
and uses the rest of the data for training. Specify a numeric scalar
from |
|
Number of folds to use in a cross-validated tree, a positive
integer. If you do not supply a cross-validation method, Default: |
|
Vector of nonnegative regularization parameter values for lasso.
If empty, Default: |
|
Use leave-one-out cross validation by setting to |
|
Numeric vector with lower cutoffs on weights for weak learners. Default: |
Output Arguments
|
|
|
|