synth_spec_tuner_api: Add, update, or remove tuners from a 'synth_spec' object

synth_spec_tuner_apiR Documentation

Add, update, or remove tuners from a synth_spec object

Description

Add, update, or remove tuners from a synth_spec object

Usage

add_custom_tuners(synth_spec, ...)

update_custom_tuners(synth_spec, ...)

remove_custom_tuners(synth_spec)

Arguments

synth_spec

A synth_spec object

...

Optional named lists with two elements, vars and tuner, mapping variable names to tuners.

Value

A new synth_spec object.

A new synth_spec object with added custom tuners.

A new synth_spec object with updated custom tuners.

A new synth_spec object with removed custom tuners.

Examples


synth_spec <- synth_spec()

tuner1 <- list(
  v = 3,
  grid = 3,
  metrics = yardstick::metric_set(yardstick::rmse)
)

add_custom_tuners(
  synth_spec = synth_spec, 
  list("vars" = c("a", "b", "c"), "tuner" = tuner1)
)


synth_spec <- synth_spec()

tuner1 <- list(
  v = 3,
  grid = 3,
  metrics = yardstick::metric_set(yardstick::rmse)
)

update_custom_tuners(
  synth_spec = synth_spec, 
  list("vars" = c("a", "b", "c"), "tuner" = tuner1)
)


synth_spec <- synth_spec()

tuner1 <- list(
  v = 3,
  grid = 3,
  metrics = yardstick::metric_set(yardstick::rmse)
)

synth_spec <- add_custom_tuners(
  synth_spec = synth_spec, 
  list("vars" = c("a", "b", "c"), "tuner" = tuner1)
)

remove_custom_tuners(synth_spec = synth_spec)


tidysynthesis documentation built on March 17, 2026, 1:06 a.m.