SL.hal9001: Wrapper for Classic SuperLearner

View source: R/sl_hal9001.R

SL.hal9001R Documentation

Wrapper for Classic SuperLearner

Description

Wrapper for SuperLearner for objects of class hal9001

Usage

SL.hal9001(
  Y,
  X,
  newX,
  family,
  obsWeights,
  id,
  max_degree = 2,
  smoothness_orders = 1,
  num_knots = 5,
  ...
)

Arguments

Y

A numeric vector of observations of the outcome variable.

X

An input matrix with dimensions number of observations -by- number of covariates that will be used to derive the design matrix of basis functions.

newX

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

family

A family object (one that is supported by glmnet) specifying the error/link family for a generalized linear model.

obsWeights

A numeric vector of observational-level weights.

id

A numeric vector of IDs.

max_degree

The highest order of interaction terms for which basis functions ought to be generated.

smoothness_orders

An integer vector of length 1 or greater, specifying the smoothness of the basis functions. See the argument smoothness_orders of fit_hal for more information.

num_knots

An integer vector of length 1 or max_degree, specifying the maximum number of knot points (i.e., bins) for each covariate for generating basis functions. See num_knots argument in fit_hal for more information.

...

Additional arguments to fit_hal.

Value

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


jeremyrcoyle/mangolassi documentation built on Nov. 18, 2023, 6:22 p.m.