Predict Target

tar_predict(
  name,
  object,
  new_data,
  type = NULL,
  opts = list(),
  ...,
  tar_args = list()
)

Arguments

name

Name of target

object

An object of class model_fit

new_data

A rectangular data object, such as a data frame.

type

A single character value or NULL. Possible values are "numeric", "class", "prob", "conf_int", "pred_int", "quantile", or "raw". When NULL, predict() will choose an appropriate value based on the model's mode.

opts

A list of optional arguments to the underlying predict function that will be used when type = "raw". The list should not include options for the model object or the new data being predicted.

...

Arguments passed on to parsnip::predict.model_fit

tar_args

Arguments passed to tar_target.