parsnip (version 0.1.1)

set_args: Change elements of a model specification

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

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

Value

An updated model object.

Details

set_args() will replace existing values of the arguments.

Examples

Run this code
# NOT RUN {
rand_forest()

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

# }

Run the code above in your browser using DataLab