Skip to content

[Soft-deprecated]

Usage

pull_workflow_set_result(x, id)

pull_workflow(x, id)

Arguments

x

A workflow set outputted by workflow_set() or workflow_map().

id

A single character string for a workflow ID.

Value

pull_workflow_set_result() produces a tune_result or resample_results object. pull_workflow() returns an unfit workflow object.

Details

pull_workflow_set_result() retrieves the results of workflow_map() for a particular workflow while pull_workflow() extracts the unfitted workflow from the info column.

The extract_workflow_set_result() and extract_workflow() functions should be used instead of these functions.

Examples

library(tune)

two_class_res
#> # A workflow set/tibble: 6 × 4
#>   wflow_id      info             option    result   
#>   <chr>         <list>           <list>    <list>   
#> 1 none_cart     <tibble [1 × 4]> <opts[3]> <tune[+]>
#> 2 none_glm      <tibble [1 × 4]> <opts[3]> <rsmp[+]>
#> 3 none_mars     <tibble [1 × 4]> <opts[3]> <tune[+]>
#> 4 yj_trans_cart <tibble [1 × 4]> <opts[3]> <tune[+]>
#> 5 yj_trans_glm  <tibble [1 × 4]> <opts[3]> <rsmp[+]>
#> 6 yj_trans_mars <tibble [1 × 4]> <opts[3]> <tune[+]>

pull_workflow_set_result(two_class_res, "none_cart")
#> Warning: `pull_workflow_set_result()` was deprecated in workflowsets 0.1.0.
#>  Please use `extract_workflow_set_result()` instead.
#> # Tuning results
#> # 5-fold cross-validation 
#> # A tibble: 5 × 4
#>   splits            id    .metrics          .notes          
#>   <list>            <chr> <list>            <list>          
#> 1 <split [632/159]> Fold1 <tibble [20 × 6]> <tibble [0 × 1]>
#> 2 <split [633/158]> Fold2 <tibble [20 × 6]> <tibble [0 × 1]>
#> 3 <split [633/158]> Fold3 <tibble [20 × 6]> <tibble [0 × 1]>
#> 4 <split [633/158]> Fold4 <tibble [20 × 6]> <tibble [0 × 1]>
#> 5 <split [633/158]> Fold5 <tibble [20 × 6]> <tibble [0 × 1]>

pull_workflow(two_class_res, "none_cart")
#> Warning: `pull_workflow()` was deprecated in workflowsets 0.1.0.
#>  Please use `extract_workflow()` instead.
#> ══ Workflow ══════════════════════════════════════════════════════════════
#> Preprocessor: Formula
#> Model: decision_tree()
#> 
#> ── Preprocessor ──────────────────────────────────────────────────────────
#> Class ~ A + B
#> 
#> ── Model ─────────────────────────────────────────────────────────────────
#> Decision Tree Model Specification (classification)
#> 
#> Main Arguments:
#>   cost_complexity = tune()
#>   min_n = tune()
#> 
#> Computational engine: rpart 
#>