Gets the target variable as text from unnested resamples
Source:R/utils-resamples.R
get_target_text_from_resamples.Rd
An internal function used by unnest_modeltime_resamples()
.
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"