Wrapper for SuperLearner for objects of class hal9001

SL.hal9001(
  Y,
  X,
  newX = NULL,
  max_degree = 3,
  fit_type = c("glmnet", "lassi"),
  n_folds = 10,
  use_min = TRUE,
  family = stats::gaussian(),
  obsWeights = rep(1, length(Y)),
  ...
)

Arguments

Y

A numeric of outcomes.

X

A matrix of predictors/covariates.

newX

A matrix of new observations on which to obtain predictions. The default of NULL computes predictions on training inputs X.

max_degree

The highest order of interaction terms for which the basis functions ought to be generated. NULL corresponds to generating basis functions for the full dimensionality of the input matrix.

fit_type

The specific routine to be called when fitting the Lasso regression via cross-validation. Choosing cv.glmnet option results in option results in a call to cv.glmnet while lassi produces a (faster) call to a custom routine based on a custom routine for fitting the Lasso.

n_folds

Integer for the number of folds to be used when splitting the data for cross-validation. This defaults to 10 as this is the convention for V-fold cross-validation.

use_min

Determines which lambda is selected from cv.glmnet. TRUE corresponds to "lambda.min" and FALSE corresponds to "lambda.1se".

family

Not used by the function directly, but meant to ensure compatibility with SuperLearner.

obsWeights

Not used by the function directly, but meant to ensure compatibility with SuperLearner. These are passed to cv.glmnet through the ... argument of fit_hal.

...

Placeholder (ignored).

Value

An object of class SL.hal9001 with a fitted hal9001 object and corresponding predictions based on the input data.