Prediction from HAL fits
# S3 method for hal9001
predict(
object,
new_data,
new_X_unpenalized = NULL,
offset = NULL,
type = c("response", "link"),
...
)
A numeric
vector of predictions from a hal9001
object.
An object of class hal9001
, containing the results of
fitting the Highly Adaptive Lasso, as produced by fit_hal
.
A matrix
or data.frame
containing new data
(i.e., observations not used for fitting the hal9001
object that's
passed in via the object
argument) for which the hal9001
object will compute predicted values.
If the user supplied X_unpenalized
during
training, then user should also supply this matrix with the same number of
observations as new_data
.
A vector of offsets. Must be provided if provided at training.
Either "response" for predictions of the response, or "link" for un-transformed predictions (on the scale of the link function).
Additional arguments passed to predict
as necessary.
Method for computing and extracting predictions from fits of the
Highly Adaptive Lasso estimator, returned as a single S3 objects of class
hal9001
.