set_args: Change elements of a model specification

Description Usage Arguments Details Value Examples

View source: R/arguments.R

Description

set_args() can be used to modify the arguments of a model specification while set_mode() is used to change the model's mode.

Usage

1
2
3
set_args(object, ...)

set_mode(object, mode)

Arguments

object

A model specification.

...

One or more named model arguments.

mode

A character string for the model type (e.g. "classification" or "regression")

Details

set_args() will replace existing values of the arguments.

Value

An updated model object.

Examples

1
2
3
4
5
rand_forest()

rand_forest() %>%
  set_args(mtry = 3, importance = TRUE) %>%
  set_mode("regression")

parsnip documentation built on July 1, 2020, 10:33 p.m.