corplot: Plot correlations between baselearners in a prediction rule...

Description Usage Arguments See Also Examples

View source: R/pre.R

Description

corplot plots correlations between baselearners in a prediction rule ensemble

Usage

1
2
3
4
5
6
7
8
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)
)

Arguments

object

object of class pre

penalty.par.val

character or numeric. Value of the penalty parameter λ to be employed for selecting the final ensemble. The default "lambda.min" employs the λ value within 1 standard error of the minimum cross-validated error. Alternatively, "lambda.min" may be specified, to employ the λ 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).

colors

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).

fig.plot

plotting region to be used for correlation plot. See fig under par.

fig.legend

plotting region to be used for legend. See fig under par.

legend.breaks

numeric vector of breakpoints to be depicted in the plot's legend. Should be a sequence from -1 to 1.

See Also

See rainbow_hcl and colorRampPalette.

Examples

1
2
3
set.seed(42)
airq.ens <- pre(Ozone ~ ., data = airquality[complete.cases(airquality),])
corplot(airq.ens)

pre documentation built on March 13, 2020, 2:23 a.m.

Related to corplot in pre...