tar_predict: Predict Target

Description Usage Arguments

View source: R/tar_predict.R

Description

Predict Target

Usage

1
2
3
4
5
6
7
8
9
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.


program--/modeltargets documentation built on Dec. 22, 2021, 9:54 a.m.