Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

other_predict

Other predict methods.


Description

These 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_confint(object, new_data, level = 0.95, std_error = FALSE, ...)

## 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 = (1:9)/10, ...)

Arguments

object

An object of class model_fit

new_data

A rectangular data object, such as a data frame.

...

Arguments to the underlying model's prediction function cannot be passed here (see opts). There are some parsnip related options that can be passed, depending on the value of type. Possible arguments are:

  • level: for types of "conf_int" and "pred_int" 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: add the standard error of fit or prediction (on the scale of the linear predictors) for types of "conf_int" and "pred_int". Default value is FALSE.

  • quantile: the quantile(s) for quantile regression (not implemented yet)

  • time: the time(s) for hazard probability estimates (not implemented yet)

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).

quant

A vector of numbers between 0 and 1 for the quantile being predicted.


parsnip

A Common API to Modeling and Analysis Functions

v0.1.5
GPL-2
Authors
Max Kuhn [aut, cre], Davis Vaughan [aut], RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.