Skip to contents

An internal function used by unnest_modeltime_resamples().

Usage

get_target_text_from_resamples(data, column_before_target = ".row")

Arguments

data

Unnested resample results

column_before_target

The text column located before the target variable. This is ".row".

Examples


# The .resample_results column is deeply nested
m750_training_resamples_fitted
#> # Modeltime Table
#> # A tibble: 3 × 4
#>   .model_id .model     .model_desc             .resample_results
#>       <int> <list>     <chr>                   <list>           
#> 1         1 <workflow> ARIMA(0,1,1)(0,1,1)[12] <rsmp[+]>        
#> 2         2 <workflow> PROPHET                 <rsmp[+]>        
#> 3         3 <workflow> GLMNET                  <rsmp[+]>        

# Unnest and prepare the resample predictions for evaluation
unnest_modeltime_resamples(m750_training_resamples_fitted) %>%
    get_target_text_from_resamples()
#> [1] "value"