Skip to contents

update() changes the arguments of a figs_tree() specification in place, the way tidymodels users expect of any model specification.

Usage

# S3 method for class 'figs_tree'
update(
  object,
  max_splits = NULL,
  max_trees = NULL,
  min_n = NULL,
  fresh = FALSE,
  ...
)

Arguments

object

A figs_tree() specification.

max_splits

An integer for the maximum total splits across all trees.

max_trees

An integer for the maximum number of trees.

min_n

An integer for the minimum number of data points in a node to split.

fresh

Logical. Should the arguments be replaced rather than merged?

...

Not used.

Value

An updated figs_tree() specification.

Examples

spec <- figs_tree(max_splits = 4)
update(spec, max_splits = 8)
#> figs tree Model Specification (regression)
#> 
#> Main Arguments:
#>   max_splits = 8
#> 
#> Computational engine: figsr 
#>