Create compact regression ensemble
cens = compact(ens)
a compact version of
cens = compact(
ens. You can predict regressions
cens exactly as you can using
cens does not contain training data,
you cannot perform some actions, such as cross validation.
A regression ensemble created with
A compact regression ensemble.
Compare the size of a regression ensemble for the
to the compact version of the ensemble:
load carsmall X = [Acceleration Cylinders Displacement Horsepower Weight]; ens = fitensemble(X,MPG,'LSBoost',100,'Tree'); cens = compact(ens); b = whos('ens'); % b.bytes = size of ens c = whos('cens'); % c.bytes = size of cens [b.bytes c.bytes] % shows ctree uses less memory ans = 311789 287368