Learn R Programming

tidysdm (version 1.0.0)

add_member: Add best member of workflow to a simple ensemble

Description

This function adds member(s) to a simple_ensemble() object, taking the best member from each workflow provided. It is possible to pass individual tune_results objects from a tuned workflow, or a workflowsets::workflow_set().

Usage

add_member(x, member, ...)

# S3 method for default add_member(x, member, ...)

# S3 method for tune_results add_member(x, member, metric = NULL, id = NULL, ...)

# S3 method for workflow_set add_member(x, member, metric = NULL, ...)

Value

a simple_ensemble with additional member(s)

Arguments

x

a simple_ensemble to which member(s) will be added

member

a tune_results, or a workflowsets::workflow_set

...

not used at the moment.

metric

A character string (or NULL) for which metric to optimize. If NULL, the first metric is used.

id

the name to be given to this workflow in the wflow_id column.