Prediction from HAL fits
# S3 method for hal9001 predict(object, offset = NULL, ..., new_data, new_X_unpenalized = NULL)
| object | An object of class |
|---|---|
| offset | A vector of offsets. Must be provided if provided at training |
| ... | Additional arguments passed to |
| new_data | A |
| new_X_unpenalized | If the user supplied |
A numeric vector of predictions from a hal9001 object.
Method for computing and extracting predictions from fits of the
Highly Adaptive Lasso estimator, returned as a single S3 objects of class
hal9001.
This prediction method does not function similarly to the equivalent
method from glmnet. In particular, this procedure will NOT return a
subset of lambdas originally specified in calling fit_hal
nor result in re-fitting. Instead, it will return predictions for all of
the lambdas specified in the call to fit_hal that constructs
object, when cv_select = FALSE. When cv_select = TRUE,
predictions will only be returned for the value of lambda selected by
cross-validation.