Skip to contents

A convenience wrapper that calls workflowsets::option_add() for every LS-SVR psvr workflow in wf_set (those whose wflow_id matches "m3" or "m4"), replacing the cost dials parameter with one built from y via cost_psvr_ls_data().

Usage

psvr_option_add_cost_ls(wf_set, y, width_log2 = 4)

Arguments

wf_set

A workflow_set object.

y

Numeric vector of strictly positive training targets.

width_log2

Passed to cost_psvr_ls_data(). Default 4.

Value

The updated workflow_set.

Details

Workflows for m1/m2 (ε-SVR) are intentionally skipped — for those, cost maps to C and the static cost_psvr() range is usually adequate.

Note: workflowsets::option_add() replaces the whole param_info option for each matched workflow. If you also need a data-driven rbf_sigma (via psvr_option_add()), build the full param_info manually with tune::extract_parameter_set_dials() and call workflowsets::option_add() in one shot, or call this helper first and then psvr_option_add() (which only touches rbf_sigma) — the latter currently overwrites the former, so prefer the manual one-shot approach when both are needed.

Examples

if (FALSE) { # \dontrun{
# After building wf_set with at least one m3 or m4 workflow:
wf_set <- psvr_option_add_cost_ls(wf_set, y = train_df$y)
} # }