Learn R Programming

pre (version 0.3.0)

corplot: Plotting baselearner correlations

Description

corplot plots correlations between baselearners

Usage

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. Value of the penalty parameter value \(\lambda\) to be used for selecting the final ensemble. The ensemble with penalty parameter criterion yielding minimum cv error ("lambda.min") is taken, by default. Alternatively, the penalty parameter yielding error within 1 standard error of minimum cv error ("lambda.1se"), or a numeric value may be specified, corresponding to one of the values of lambda in the sequence used by glmnet, for which estimated cv error can be inspected by running x$glmnet.fit and plot(x$glmnet.fit).

colors

vector of contiguous colors to be used for plotting. If colors = NULL (default), colorRampPalette(c("#053061", "#2166AC", "#4393C3", "#92C5DE", "#D1E5F0", "#FFFFFF", "#FDDBC7", "#F4A582", "#D6604D", "#B2182B", "#67001F"))(200) is used. A different set of plotting colors can be specified, for example: colors = cm.colors(100), or colorRampPalette(c("blue", "white", "red"))(150). See cm.colors or colorRampPalette.

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 breakspoints and colors to be depicted in the plot's legend.

Examples

Run this code
# 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