Learn R Programming

h2o (version 3.10.4.6)

h2o.stackedEnsemble: Build a stacked ensemble (aka. Super Learner) using the H2O base learning algorithms specified by the user.

Description

Build a stacked ensemble (aka. Super Learner) using the H2O base learning algorithms specified by the user.

Usage

h2o.stackedEnsemble(x, y, training_frame, model_id = NULL,
  validation_frame = NULL, base_models = list(),
  selection_strategy = c("choose_all"))

Arguments

x

A vector containing the names or indices of the predictor variables to use in building the model. If x is missing,then all columns except y are used.

y

The name of the response variable in the model.If the data does not contain a header, this is the first column index, and increasing from left to right. (The response must be either an integer or a categorical variable).

training_frame

Id of the training data frame (Not required, to allow initial validation of model parameters).

model_id

Destination id for this model; auto-generated if not specified.

validation_frame

Id of the validation data frame.

base_models

List of model ids which we can stack together. Which ones are chosen depends on the selection_strategy (currently, all models will be used since selection_strategy can only be set to choose_all). Models must have been cross-validated using nfolds > 1, fold_assignment equal to Modulo, and keep_cross_validation_folds must be set to True. Defaults to [].

selection_strategy

Strategy for choosing which models to stack. Must be one of: "choose_all".

Examples

Run this code
# See example R code here:
# http://docs.h2o.ai/h2o/latest-stable/h2o-docs/data-science/stacked-ensembles.html

Run the code above in your browser using DataLab