These are internal functions not meant to be directly called by the user.
# S3 method for model_fit
predict_class(object, new_data, ...)# S3 method for model_fit
predict_classprob(object, new_data, ...)
# S3 method for model_fit
predict_hazard(object, new_data, eval_time, time = deprecated(), ...)
# S3 method for model_fit
predict_confint(object, new_data, level = 0.95, std_error = FALSE, ...)
# S3 method for model_fit
predict_linear_pred(object, new_data, ...)
predict_linear_pred(object, ...)
# S3 method for model_fit
predict_numeric(object, new_data, ...)
predict_numeric(object, ...)
# S3 method for model_fit
predict_quantile(
object,
new_data,
quantile = (1:9)/10,
interval = "none",
level = 0.95,
...
)
# S3 method for model_fit
predict_survival(
object,
new_data,
eval_time,
time = deprecated(),
interval = "none",
level = 0.95,
...
)
predict_survival(object, ...)
# S3 method for model_fit
predict_time(object, new_data, ...)
predict_time(object, ...)
An object of class model_fit
.
A rectangular data object, such as a data frame.
Additional parsnip
-related options, depending on the
value of type
. Arguments to the underlying model's prediction
function cannot be passed here (use the opts
argument instead).
Possible arguments are:
interval
: for type
equal to "survival"
or "quantile"
, should
interval estimates be added, if available? Options are "none"
and "confidence"
.
level
: for type
equal to "conf_int"
, "pred_int"
, or "survival"
,
this is the parameter for the tail area of the intervals
(e.g. confidence level for confidence intervals).
Default value is 0.95
.
std_error
: for type
equal to "conf_int"
or "pred_int"
, add
the standard error of fit or prediction (on the scale of the
linear predictors). Default value is FALSE
.
quantile
: for type
equal to quantile
, the quantiles of the
distribution. Default is (1:9)/10
.
eval_time
: for type
equal to "survival"
or "hazard"
, the
time points at which the survival probability or hazard is estimated.
A single numeric value between zero and one for the interval estimates.
A single logical for whether the standard error should be returned (assuming that the model can compute it).
A vector of numbers between 0 and 1 for the quantile being predicted.