
Other predict methods.
Source:R/predict_class.R, R/predict_classprob.R, R/predict_hazard.R, and 6 more
other_predict.RdThese are internal functions not meant to be directly called by the user.
Usage
# S3 method for class 'model_fit'
predict_class(object, new_data, ...)
# S3 method for class 'model_fit'
predict_classprob(object, new_data, ...)
# S3 method for class 'model_fit'
predict_hazard(object, new_data, eval_time, time = deprecated(), ...)
# S3 method for class 'model_fit'
predict_confint(object, new_data, level = 0.95, std_error = FALSE, ...)
predict_confint(object, ...)
predict_predint(object, ...)
# S3 method for class 'model_fit'
predict_predint(object, new_data, level = 0.95, std_error = FALSE, ...)
predict_predint(object, ...)
# S3 method for class 'model_fit'
predict_linear_pred(object, new_data, ...)
predict_linear_pred(object, ...)
# S3 method for class 'model_fit'
predict_numeric(object, new_data, ...)
predict_numeric(object, ...)
# S3 method for class 'model_fit'
predict_quantile(
object,
new_data,
quantile_levels = NULL,
quantile = deprecated(),
interval = "none",
level = 0.95,
...
)
# S3 method for class 'model_fit'
predict_survival(
object,
new_data,
eval_time,
time = deprecated(),
interval = "none",
level = 0.95,
...
)
predict_survival(object, ...)
# S3 method for class 'model_fit'
predict_time(object, new_data, ...)
predict_time(object, ...)Arguments
- object
A model fit.
- new_data
A rectangular data object, such as a data frame.
- ...
Additional
parsnip-related options, depending on the value oftype. Arguments to the underlying model's prediction function cannot be passed here (use theoptsargument instead). Possible arguments are:interval: fortypeequal to"survival"or"quantile", should interval estimates be added, if available? Options are"none"and"confidence".level: fortypeequal 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 is0.95.std_error: fortypeequal to"conf_int"or"pred_int", add the standard error of fit or prediction (on the scale of the linear predictors). Default value isFALSE.quantile: fortypeequal toquantile, the quantiles of the distribution. Default is(1:9)/10.eval_time: fortypeequal to"survival"or"hazard", the time points at which the survival probability or hazard is estimated.
- level
A single numeric value between zero and one for the interval estimates.
- std_error
A single logical for whether the standard error should be returned (assuming that the model can compute it).
- quantile, quantile_levels
A vector of values between 0 and 1 for the quantile to be predicted. If the model has a
"quantile regression"mode, this value should beNULL. For other modes, the default is(1:9)/10. Note that, as of version 1.3.0 of parsnip, thequantileis deprecated. Usequantile_levelsinstead.