corplot
plots correlations between baselearners in a prediction rule ensemble
corplot(object, penalty.par.val = "lambda.1se", colors = NULL,
fig.plot = c(0, 0.85, 0, 1), fig.legend = c(0.8, 0.95, 0, 1),
legend.breaks = seq(-1, 1, by = 0.1))
object of class pre
character or numeric. Value of the penalty parameter
\(\lambda\) to be employed for selecting the final ensemble. The default
"lambda.min"
employs the \(\lambda\) value within 1 standard
error of the minimum cross-validated error. Alternatively,
"lambda.min"
may be specified, to employ the \(\lambda\) value
with minimum cross-validated error, or a numeric value \(>0\) may be
specified, with higher values yielding a sparser ensemble. To evaluate the
trade-off between accuracy and sparsity of the final ensemble, inspect
pre_object$glmnet.fit
and plot(pre_object$glmnet.fit)
.
vector of contiguous colors to be used for plotting. If
colors = NULL
(default), colorRampPalette
is used to generate
a sequence of 200 colors going from red to white to blue. A different set of
plotting colors can be specified here, for example:
cm.colors(100)
, colorspace::rainbow_hcl)(100)
or colorRampPalette(c("red", "yellow", "green"))(100)
.
plotting region to be used for correlation plot. See
fig
under par
.
plotting region to be used for legend. See fig
under par
.
numeric vector of breakpoints to be depicted in the plot's legend. Should be a sequence from -1 to 1.
See
rainbow_hcl
and colorRampPalette
.
# NOT RUN {
set.seed(42)
airq.ens <- pre(Ozone ~ ., data = airquality[complete.cases(airquality),])
corplot(airq.ens)
# }
Run the code above in your browser using DataLab