Skip to contents

Implements parsnip's update protocol so that tune::tune_grid() (and any other caller that finalises a spec via update()) can fill in the tuned values for trees, mtry, and penalty. Without this method, update() falls back to stats::update.default and fails with "need an object with call component".

Usage

# S3 method for class 'pp_rand_forest'
update(
  object,
  parameters = NULL,
  trees = NULL,
  mtry = NULL,
  penalty = NULL,
  fresh = FALSE,
  ...
)

Arguments

object

A pp_rand_forest model specification.

parameters

A named list of parameters to update (alternative to passing them as args).

trees, mtry, penalty

New values for the corresponding parameters.

fresh

If TRUE, drop any previously-set arg whose new value is not provided.

...

Engine-specific arguments to update.

Value

An updated pp_rand_forest model specification.