Skip to contents

This is a wrapper for yardstick that simplifies time series regression accuracy metric calculations from a Modeltime Table that has been resampled and fitted using modeltime_fit_resamples().

Usage

modeltime_resample_accuracy(
  object,
  summary_fns = mean,
  metric_set = default_forecast_accuracy_metric_set(),
  ...
)

Arguments

object

a Modeltime Table with a column '.resample_results' (the output of modeltime_fit_resamples())

summary_fns

One or more functions to analyze resamples. The default is mean(). Possible values are:

  • NULL, to returns the resamples untransformed.

  • A function, e.g. mean.

  • A purrr-style lambda, e.g. ~ mean(.x, na.rm = TRUE)

  • A list of functions/lambdas, e.g. list(mean = mean, sd = sd)

metric_set

A yardstick::metric_set() that is used to summarize one or more forecast accuracy (regression) metrics.

...

Additional arguments passed to the function calls in summary_fns.

Details

#' Default Accuracy Metrics

The following accuracy metrics are included by default via modeltime::default_forecast_accuracy_metric_set():

Summary Functions

By default, modeltime_resample_accuracy() returns the average accuracy metrics for each resample prediction.

The user can change this default behavior using summary_fns. Simply pass one or more Summary Functions. Internally, the functions are passed to dplyr::across(.fns), which applies the summary functions.

Returning Unsummarized Results

You can pass summary_fns = NULL to return unsummarized results by .resample_id.

Professional Tables (Interactive & Static)

Use modeltime::table_modeltime_accuracy() to format the results for reporting in reactable (interactive) or gt (static) formats, which are perfect for Shiny Apps (interactive) and PDF Reports (static).

Examples

library(modeltime)

# Mean (Default)
m750_training_resamples_fitted %>%
    modeltime_resample_accuracy() %>%
    table_modeltime_accuracy(.interactive = FALSE)
#> <div id="grlcfwptwe" style="padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;">
#>   <style>#grlcfwptwe table {
#>   font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
#>   -webkit-font-smoothing: antialiased;
#>   -moz-osx-font-smoothing: grayscale;
#> }
#> 
#> #grlcfwptwe thead, #grlcfwptwe tbody, #grlcfwptwe tfoot, #grlcfwptwe tr, #grlcfwptwe td, #grlcfwptwe th {
#>   border-style: none;
#> }
#> 
#> #grlcfwptwe p {
#>   margin: 0;
#>   padding: 0;
#> }
#> 
#> #grlcfwptwe .gt_table {
#>   display: table;
#>   border-collapse: collapse;
#>   line-height: normal;
#>   margin-left: auto;
#>   margin-right: auto;
#>   color: #333333;
#>   font-size: 16px;
#>   font-weight: normal;
#>   font-style: normal;
#>   background-color: #FFFFFF;
#>   width: auto;
#>   border-top-style: solid;
#>   border-top-width: 2px;
#>   border-top-color: #A8A8A8;
#>   border-right-style: none;
#>   border-right-width: 2px;
#>   border-right-color: #D3D3D3;
#>   border-bottom-style: solid;
#>   border-bottom-width: 2px;
#>   border-bottom-color: #A8A8A8;
#>   border-left-style: none;
#>   border-left-width: 2px;
#>   border-left-color: #D3D3D3;
#> }
#> 
#> #grlcfwptwe .gt_caption {
#>   padding-top: 4px;
#>   padding-bottom: 4px;
#> }
#> 
#> #grlcfwptwe .gt_title {
#>   color: #333333;
#>   font-size: 125%;
#>   font-weight: initial;
#>   padding-top: 4px;
#>   padding-bottom: 4px;
#>   padding-left: 5px;
#>   padding-right: 5px;
#>   border-bottom-color: #FFFFFF;
#>   border-bottom-width: 0;
#> }
#> 
#> #grlcfwptwe .gt_subtitle {
#>   color: #333333;
#>   font-size: 85%;
#>   font-weight: initial;
#>   padding-top: 3px;
#>   padding-bottom: 5px;
#>   padding-left: 5px;
#>   padding-right: 5px;
#>   border-top-color: #FFFFFF;
#>   border-top-width: 0;
#> }
#> 
#> #grlcfwptwe .gt_heading {
#>   background-color: #FFFFFF;
#>   text-align: center;
#>   border-bottom-color: #FFFFFF;
#>   border-left-style: none;
#>   border-left-width: 1px;
#>   border-left-color: #D3D3D3;
#>   border-right-style: none;
#>   border-right-width: 1px;
#>   border-right-color: #D3D3D3;
#> }
#> 
#> #grlcfwptwe .gt_bottom_border {
#>   border-bottom-style: solid;
#>   border-bottom-width: 2px;
#>   border-bottom-color: #D3D3D3;
#> }
#> 
#> #grlcfwptwe .gt_col_headings {
#>   border-top-style: solid;
#>   border-top-width: 2px;
#>   border-top-color: #D3D3D3;
#>   border-bottom-style: solid;
#>   border-bottom-width: 2px;
#>   border-bottom-color: #D3D3D3;
#>   border-left-style: none;
#>   border-left-width: 1px;
#>   border-left-color: #D3D3D3;
#>   border-right-style: none;
#>   border-right-width: 1px;
#>   border-right-color: #D3D3D3;
#> }
#> 
#> #grlcfwptwe .gt_col_heading {
#>   color: #333333;
#>   background-color: #FFFFFF;
#>   font-size: 100%;
#>   font-weight: normal;
#>   text-transform: inherit;
#>   border-left-style: none;
#>   border-left-width: 1px;
#>   border-left-color: #D3D3D3;
#>   border-right-style: none;
#>   border-right-width: 1px;
#>   border-right-color: #D3D3D3;
#>   vertical-align: bottom;
#>   padding-top: 5px;
#>   padding-bottom: 6px;
#>   padding-left: 5px;
#>   padding-right: 5px;
#>   overflow-x: hidden;
#> }
#> 
#> #grlcfwptwe .gt_column_spanner_outer {
#>   color: #333333;
#>   background-color: #FFFFFF;
#>   font-size: 100%;
#>   font-weight: normal;
#>   text-transform: inherit;
#>   padding-top: 0;
#>   padding-bottom: 0;
#>   padding-left: 4px;
#>   padding-right: 4px;
#> }
#> 
#> #grlcfwptwe .gt_column_spanner_outer:first-child {
#>   padding-left: 0;
#> }
#> 
#> #grlcfwptwe .gt_column_spanner_outer:last-child {
#>   padding-right: 0;
#> }
#> 
#> #grlcfwptwe .gt_column_spanner {
#>   border-bottom-style: solid;
#>   border-bottom-width: 2px;
#>   border-bottom-color: #D3D3D3;
#>   vertical-align: bottom;
#>   padding-top: 5px;
#>   padding-bottom: 5px;
#>   overflow-x: hidden;
#>   display: inline-block;
#>   width: 100%;
#> }
#> 
#> #grlcfwptwe .gt_spanner_row {
#>   border-bottom-style: hidden;
#> }
#> 
#> #grlcfwptwe .gt_group_heading {
#>   padding-top: 8px;
#>   padding-bottom: 8px;
#>   padding-left: 5px;
#>   padding-right: 5px;
#>   color: #333333;
#>   background-color: #FFFFFF;
#>   font-size: 100%;
#>   font-weight: initial;
#>   text-transform: inherit;
#>   border-top-style: solid;
#>   border-top-width: 2px;
#>   border-top-color: #D3D3D3;
#>   border-bottom-style: solid;
#>   border-bottom-width: 2px;
#>   border-bottom-color: #D3D3D3;
#>   border-left-style: none;
#>   border-left-width: 1px;
#>   border-left-color: #D3D3D3;
#>   border-right-style: none;
#>   border-right-width: 1px;
#>   border-right-color: #D3D3D3;
#>   vertical-align: middle;
#>   text-align: left;
#> }
#> 
#> #grlcfwptwe .gt_empty_group_heading {
#>   padding: 0.5px;
#>   color: #333333;
#>   background-color: #FFFFFF;
#>   font-size: 100%;
#>   font-weight: initial;
#>   border-top-style: solid;
#>   border-top-width: 2px;
#>   border-top-color: #D3D3D3;
#>   border-bottom-style: solid;
#>   border-bottom-width: 2px;
#>   border-bottom-color: #D3D3D3;
#>   vertical-align: middle;
#> }
#> 
#> #grlcfwptwe .gt_from_md > :first-child {
#>   margin-top: 0;
#> }
#> 
#> #grlcfwptwe .gt_from_md > :last-child {
#>   margin-bottom: 0;
#> }
#> 
#> #grlcfwptwe .gt_row {
#>   padding-top: 8px;
#>   padding-bottom: 8px;
#>   padding-left: 5px;
#>   padding-right: 5px;
#>   margin: 10px;
#>   border-top-style: solid;
#>   border-top-width: 1px;
#>   border-top-color: #D3D3D3;
#>   border-left-style: none;
#>   border-left-width: 1px;
#>   border-left-color: #D3D3D3;
#>   border-right-style: none;
#>   border-right-width: 1px;
#>   border-right-color: #D3D3D3;
#>   vertical-align: middle;
#>   overflow-x: hidden;
#> }
#> 
#> #grlcfwptwe .gt_stub {
#>   color: #333333;
#>   background-color: #FFFFFF;
#>   font-size: 100%;
#>   font-weight: initial;
#>   text-transform: inherit;
#>   border-right-style: solid;
#>   border-right-width: 2px;
#>   border-right-color: #D3D3D3;
#>   padding-left: 5px;
#>   padding-right: 5px;
#> }
#> 
#> #grlcfwptwe .gt_stub_row_group {
#>   color: #333333;
#>   background-color: #FFFFFF;
#>   font-size: 100%;
#>   font-weight: initial;
#>   text-transform: inherit;
#>   border-right-style: solid;
#>   border-right-width: 2px;
#>   border-right-color: #D3D3D3;
#>   padding-left: 5px;
#>   padding-right: 5px;
#>   vertical-align: top;
#> }
#> 
#> #grlcfwptwe .gt_row_group_first td {
#>   border-top-width: 2px;
#> }
#> 
#> #grlcfwptwe .gt_row_group_first th {
#>   border-top-width: 2px;
#> }
#> 
#> #grlcfwptwe .gt_summary_row {
#>   color: #333333;
#>   background-color: #FFFFFF;
#>   text-transform: inherit;
#>   padding-top: 8px;
#>   padding-bottom: 8px;
#>   padding-left: 5px;
#>   padding-right: 5px;
#> }
#> 
#> #grlcfwptwe .gt_first_summary_row {
#>   border-top-style: solid;
#>   border-top-color: #D3D3D3;
#> }
#> 
#> #grlcfwptwe .gt_first_summary_row.thick {
#>   border-top-width: 2px;
#> }
#> 
#> #grlcfwptwe .gt_last_summary_row {
#>   padding-top: 8px;
#>   padding-bottom: 8px;
#>   padding-left: 5px;
#>   padding-right: 5px;
#>   border-bottom-style: solid;
#>   border-bottom-width: 2px;
#>   border-bottom-color: #D3D3D3;
#> }
#> 
#> #grlcfwptwe .gt_grand_summary_row {
#>   color: #333333;
#>   background-color: #FFFFFF;
#>   text-transform: inherit;
#>   padding-top: 8px;
#>   padding-bottom: 8px;
#>   padding-left: 5px;
#>   padding-right: 5px;
#> }
#> 
#> #grlcfwptwe .gt_first_grand_summary_row {
#>   padding-top: 8px;
#>   padding-bottom: 8px;
#>   padding-left: 5px;
#>   padding-right: 5px;
#>   border-top-style: double;
#>   border-top-width: 6px;
#>   border-top-color: #D3D3D3;
#> }
#> 
#> #grlcfwptwe .gt_last_grand_summary_row_top {
#>   padding-top: 8px;
#>   padding-bottom: 8px;
#>   padding-left: 5px;
#>   padding-right: 5px;
#>   border-bottom-style: double;
#>   border-bottom-width: 6px;
#>   border-bottom-color: #D3D3D3;
#> }
#> 
#> #grlcfwptwe .gt_striped {
#>   background-color: rgba(128, 128, 128, 0.05);
#> }
#> 
#> #grlcfwptwe .gt_table_body {
#>   border-top-style: solid;
#>   border-top-width: 2px;
#>   border-top-color: #D3D3D3;
#>   border-bottom-style: solid;
#>   border-bottom-width: 2px;
#>   border-bottom-color: #D3D3D3;
#> }
#> 
#> #grlcfwptwe .gt_footnotes {
#>   color: #333333;
#>   background-color: #FFFFFF;
#>   border-bottom-style: none;
#>   border-bottom-width: 2px;
#>   border-bottom-color: #D3D3D3;
#>   border-left-style: none;
#>   border-left-width: 2px;
#>   border-left-color: #D3D3D3;
#>   border-right-style: none;
#>   border-right-width: 2px;
#>   border-right-color: #D3D3D3;
#> }
#> 
#> #grlcfwptwe .gt_footnote {
#>   margin: 0px;
#>   font-size: 90%;
#>   padding-top: 4px;
#>   padding-bottom: 4px;
#>   padding-left: 5px;
#>   padding-right: 5px;
#> }
#> 
#> #grlcfwptwe .gt_sourcenotes {
#>   color: #333333;
#>   background-color: #FFFFFF;
#>   border-bottom-style: none;
#>   border-bottom-width: 2px;
#>   border-bottom-color: #D3D3D3;
#>   border-left-style: none;
#>   border-left-width: 2px;
#>   border-left-color: #D3D3D3;
#>   border-right-style: none;
#>   border-right-width: 2px;
#>   border-right-color: #D3D3D3;
#> }
#> 
#> #grlcfwptwe .gt_sourcenote {
#>   font-size: 90%;
#>   padding-top: 4px;
#>   padding-bottom: 4px;
#>   padding-left: 5px;
#>   padding-right: 5px;
#> }
#> 
#> #grlcfwptwe .gt_left {
#>   text-align: left;
#> }
#> 
#> #grlcfwptwe .gt_center {
#>   text-align: center;
#> }
#> 
#> #grlcfwptwe .gt_right {
#>   text-align: right;
#>   font-variant-numeric: tabular-nums;
#> }
#> 
#> #grlcfwptwe .gt_font_normal {
#>   font-weight: normal;
#> }
#> 
#> #grlcfwptwe .gt_font_bold {
#>   font-weight: bold;
#> }
#> 
#> #grlcfwptwe .gt_font_italic {
#>   font-style: italic;
#> }
#> 
#> #grlcfwptwe .gt_super {
#>   font-size: 65%;
#> }
#> 
#> #grlcfwptwe .gt_footnote_marks {
#>   font-size: 75%;
#>   vertical-align: 0.4em;
#>   position: initial;
#> }
#> 
#> #grlcfwptwe .gt_asterisk {
#>   font-size: 100%;
#>   vertical-align: 0;
#> }
#> 
#> #grlcfwptwe .gt_indent_1 {
#>   text-indent: 5px;
#> }
#> 
#> #grlcfwptwe .gt_indent_2 {
#>   text-indent: 10px;
#> }
#> 
#> #grlcfwptwe .gt_indent_3 {
#>   text-indent: 15px;
#> }
#> 
#> #grlcfwptwe .gt_indent_4 {
#>   text-indent: 20px;
#> }
#> 
#> #grlcfwptwe .gt_indent_5 {
#>   text-indent: 25px;
#> }
#> </style>
#>   <table class="gt_table" data-quarto-disable-processing="false" data-quarto-bootstrap="false">
#>   <thead>
#>     <tr class="gt_heading">
#>       <td colspan="10" class="gt_heading gt_title gt_font_normal gt_bottom_border" style>Accuracy Table</td>
#>     </tr>
#>     
#>     <tr class="gt_col_headings">
#>       <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id=".model_id">.model_id</th>
#>       <th class="gt_col_heading gt_columns_bottom_border gt_left" rowspan="1" colspan="1" scope="col" id=".model_desc">.model_desc</th>
#>       <th class="gt_col_heading gt_columns_bottom_border gt_left" rowspan="1" colspan="1" scope="col" id=".type">.type</th>
#>       <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="n">n</th>
#>       <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="mae">mae</th>
#>       <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="mape">mape</th>
#>       <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="mase">mase</th>
#>       <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="smape">smape</th>
#>       <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="rmse">rmse</th>
#>       <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="rsq">rsq</th>
#>     </tr>
#>   </thead>
#>   <tbody class="gt_table_body">
#>     <tr><td headers=".model_id" class="gt_row gt_right">1</td>
#> <td headers=".model_desc" class="gt_row gt_left">ARIMA(0,1,1)(0,1,1)[12]</td>
#> <td headers=".type" class="gt_row gt_left">Resamples</td>
#> <td headers="n" class="gt_row gt_right">6</td>
#> <td headers="mae" class="gt_row gt_right">294.51</td>
#> <td headers="mape" class="gt_row gt_right">2.95</td>
#> <td headers="mase" class="gt_row gt_right">1.18</td>
#> <td headers="smape" class="gt_row gt_right">2.94</td>
#> <td headers="rmse" class="gt_row gt_right">355.49</td>
#> <td headers="rsq" class="gt_row gt_right">0.80</td></tr>
#>     <tr><td headers=".model_id" class="gt_row gt_right">2</td>
#> <td headers=".model_desc" class="gt_row gt_left">PROPHET</td>
#> <td headers=".type" class="gt_row gt_left">Resamples</td>
#> <td headers="n" class="gt_row gt_right">6</td>
#> <td headers="mae" class="gt_row gt_right">458.05</td>
#> <td headers="mape" class="gt_row gt_right">4.59</td>
#> <td headers="mase" class="gt_row gt_right">1.85</td>
#> <td headers="smape" class="gt_row gt_right">4.55</td>
#> <td headers="rmse" class="gt_row gt_right">515.49</td>
#> <td headers="rsq" class="gt_row gt_right">0.78</td></tr>
#>     <tr><td headers=".model_id" class="gt_row gt_right">3</td>
#> <td headers=".model_desc" class="gt_row gt_left">GLMNET</td>
#> <td headers=".type" class="gt_row gt_left">Resamples</td>
#> <td headers="n" class="gt_row gt_right">6</td>
#> <td headers="mae" class="gt_row gt_right">706.10</td>
#> <td headers="mape" class="gt_row gt_right">7.16</td>
#> <td headers="mase" class="gt_row gt_right">2.80</td>
#> <td headers="smape" class="gt_row gt_right">6.92</td>
#> <td headers="rmse" class="gt_row gt_right">753.04</td>
#> <td headers="rsq" class="gt_row gt_right">0.77</td></tr>
#>   </tbody>
#>   
#>   
#> </table>
#> </div>

# Mean and Standard Deviation
m750_training_resamples_fitted %>%
    modeltime_resample_accuracy(
        summary_fns = list(mean = mean, sd = sd)
    ) %>%
    table_modeltime_accuracy(.interactive = FALSE)
#> <div id="vlglhzldjq" style="padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;">
#>   <style>#vlglhzldjq table {
#>   font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
#>   -webkit-font-smoothing: antialiased;
#>   -moz-osx-font-smoothing: grayscale;
#> }
#> 
#> #vlglhzldjq thead, #vlglhzldjq tbody, #vlglhzldjq tfoot, #vlglhzldjq tr, #vlglhzldjq td, #vlglhzldjq th {
#>   border-style: none;
#> }
#> 
#> #vlglhzldjq p {
#>   margin: 0;
#>   padding: 0;
#> }
#> 
#> #vlglhzldjq .gt_table {
#>   display: table;
#>   border-collapse: collapse;
#>   line-height: normal;
#>   margin-left: auto;
#>   margin-right: auto;
#>   color: #333333;
#>   font-size: 16px;
#>   font-weight: normal;
#>   font-style: normal;
#>   background-color: #FFFFFF;
#>   width: auto;
#>   border-top-style: solid;
#>   border-top-width: 2px;
#>   border-top-color: #A8A8A8;
#>   border-right-style: none;
#>   border-right-width: 2px;
#>   border-right-color: #D3D3D3;
#>   border-bottom-style: solid;
#>   border-bottom-width: 2px;
#>   border-bottom-color: #A8A8A8;
#>   border-left-style: none;
#>   border-left-width: 2px;
#>   border-left-color: #D3D3D3;
#> }
#> 
#> #vlglhzldjq .gt_caption {
#>   padding-top: 4px;
#>   padding-bottom: 4px;
#> }
#> 
#> #vlglhzldjq .gt_title {
#>   color: #333333;
#>   font-size: 125%;
#>   font-weight: initial;
#>   padding-top: 4px;
#>   padding-bottom: 4px;
#>   padding-left: 5px;
#>   padding-right: 5px;
#>   border-bottom-color: #FFFFFF;
#>   border-bottom-width: 0;
#> }
#> 
#> #vlglhzldjq .gt_subtitle {
#>   color: #333333;
#>   font-size: 85%;
#>   font-weight: initial;
#>   padding-top: 3px;
#>   padding-bottom: 5px;
#>   padding-left: 5px;
#>   padding-right: 5px;
#>   border-top-color: #FFFFFF;
#>   border-top-width: 0;
#> }
#> 
#> #vlglhzldjq .gt_heading {
#>   background-color: #FFFFFF;
#>   text-align: center;
#>   border-bottom-color: #FFFFFF;
#>   border-left-style: none;
#>   border-left-width: 1px;
#>   border-left-color: #D3D3D3;
#>   border-right-style: none;
#>   border-right-width: 1px;
#>   border-right-color: #D3D3D3;
#> }
#> 
#> #vlglhzldjq .gt_bottom_border {
#>   border-bottom-style: solid;
#>   border-bottom-width: 2px;
#>   border-bottom-color: #D3D3D3;
#> }
#> 
#> #vlglhzldjq .gt_col_headings {
#>   border-top-style: solid;
#>   border-top-width: 2px;
#>   border-top-color: #D3D3D3;
#>   border-bottom-style: solid;
#>   border-bottom-width: 2px;
#>   border-bottom-color: #D3D3D3;
#>   border-left-style: none;
#>   border-left-width: 1px;
#>   border-left-color: #D3D3D3;
#>   border-right-style: none;
#>   border-right-width: 1px;
#>   border-right-color: #D3D3D3;
#> }
#> 
#> #vlglhzldjq .gt_col_heading {
#>   color: #333333;
#>   background-color: #FFFFFF;
#>   font-size: 100%;
#>   font-weight: normal;
#>   text-transform: inherit;
#>   border-left-style: none;
#>   border-left-width: 1px;
#>   border-left-color: #D3D3D3;
#>   border-right-style: none;
#>   border-right-width: 1px;
#>   border-right-color: #D3D3D3;
#>   vertical-align: bottom;
#>   padding-top: 5px;
#>   padding-bottom: 6px;
#>   padding-left: 5px;
#>   padding-right: 5px;
#>   overflow-x: hidden;
#> }
#> 
#> #vlglhzldjq .gt_column_spanner_outer {
#>   color: #333333;
#>   background-color: #FFFFFF;
#>   font-size: 100%;
#>   font-weight: normal;
#>   text-transform: inherit;
#>   padding-top: 0;
#>   padding-bottom: 0;
#>   padding-left: 4px;
#>   padding-right: 4px;
#> }
#> 
#> #vlglhzldjq .gt_column_spanner_outer:first-child {
#>   padding-left: 0;
#> }
#> 
#> #vlglhzldjq .gt_column_spanner_outer:last-child {
#>   padding-right: 0;
#> }
#> 
#> #vlglhzldjq .gt_column_spanner {
#>   border-bottom-style: solid;
#>   border-bottom-width: 2px;
#>   border-bottom-color: #D3D3D3;
#>   vertical-align: bottom;
#>   padding-top: 5px;
#>   padding-bottom: 5px;
#>   overflow-x: hidden;
#>   display: inline-block;
#>   width: 100%;
#> }
#> 
#> #vlglhzldjq .gt_spanner_row {
#>   border-bottom-style: hidden;
#> }
#> 
#> #vlglhzldjq .gt_group_heading {
#>   padding-top: 8px;
#>   padding-bottom: 8px;
#>   padding-left: 5px;
#>   padding-right: 5px;
#>   color: #333333;
#>   background-color: #FFFFFF;
#>   font-size: 100%;
#>   font-weight: initial;
#>   text-transform: inherit;
#>   border-top-style: solid;
#>   border-top-width: 2px;
#>   border-top-color: #D3D3D3;
#>   border-bottom-style: solid;
#>   border-bottom-width: 2px;
#>   border-bottom-color: #D3D3D3;
#>   border-left-style: none;
#>   border-left-width: 1px;
#>   border-left-color: #D3D3D3;
#>   border-right-style: none;
#>   border-right-width: 1px;
#>   border-right-color: #D3D3D3;
#>   vertical-align: middle;
#>   text-align: left;
#> }
#> 
#> #vlglhzldjq .gt_empty_group_heading {
#>   padding: 0.5px;
#>   color: #333333;
#>   background-color: #FFFFFF;
#>   font-size: 100%;
#>   font-weight: initial;
#>   border-top-style: solid;
#>   border-top-width: 2px;
#>   border-top-color: #D3D3D3;
#>   border-bottom-style: solid;
#>   border-bottom-width: 2px;
#>   border-bottom-color: #D3D3D3;
#>   vertical-align: middle;
#> }
#> 
#> #vlglhzldjq .gt_from_md > :first-child {
#>   margin-top: 0;
#> }
#> 
#> #vlglhzldjq .gt_from_md > :last-child {
#>   margin-bottom: 0;
#> }
#> 
#> #vlglhzldjq .gt_row {
#>   padding-top: 8px;
#>   padding-bottom: 8px;
#>   padding-left: 5px;
#>   padding-right: 5px;
#>   margin: 10px;
#>   border-top-style: solid;
#>   border-top-width: 1px;
#>   border-top-color: #D3D3D3;
#>   border-left-style: none;
#>   border-left-width: 1px;
#>   border-left-color: #D3D3D3;
#>   border-right-style: none;
#>   border-right-width: 1px;
#>   border-right-color: #D3D3D3;
#>   vertical-align: middle;
#>   overflow-x: hidden;
#> }
#> 
#> #vlglhzldjq .gt_stub {
#>   color: #333333;
#>   background-color: #FFFFFF;
#>   font-size: 100%;
#>   font-weight: initial;
#>   text-transform: inherit;
#>   border-right-style: solid;
#>   border-right-width: 2px;
#>   border-right-color: #D3D3D3;
#>   padding-left: 5px;
#>   padding-right: 5px;
#> }
#> 
#> #vlglhzldjq .gt_stub_row_group {
#>   color: #333333;
#>   background-color: #FFFFFF;
#>   font-size: 100%;
#>   font-weight: initial;
#>   text-transform: inherit;
#>   border-right-style: solid;
#>   border-right-width: 2px;
#>   border-right-color: #D3D3D3;
#>   padding-left: 5px;
#>   padding-right: 5px;
#>   vertical-align: top;
#> }
#> 
#> #vlglhzldjq .gt_row_group_first td {
#>   border-top-width: 2px;
#> }
#> 
#> #vlglhzldjq .gt_row_group_first th {
#>   border-top-width: 2px;
#> }
#> 
#> #vlglhzldjq .gt_summary_row {
#>   color: #333333;
#>   background-color: #FFFFFF;
#>   text-transform: inherit;
#>   padding-top: 8px;
#>   padding-bottom: 8px;
#>   padding-left: 5px;
#>   padding-right: 5px;
#> }
#> 
#> #vlglhzldjq .gt_first_summary_row {
#>   border-top-style: solid;
#>   border-top-color: #D3D3D3;
#> }
#> 
#> #vlglhzldjq .gt_first_summary_row.thick {
#>   border-top-width: 2px;
#> }
#> 
#> #vlglhzldjq .gt_last_summary_row {
#>   padding-top: 8px;
#>   padding-bottom: 8px;
#>   padding-left: 5px;
#>   padding-right: 5px;
#>   border-bottom-style: solid;
#>   border-bottom-width: 2px;
#>   border-bottom-color: #D3D3D3;
#> }
#> 
#> #vlglhzldjq .gt_grand_summary_row {
#>   color: #333333;
#>   background-color: #FFFFFF;
#>   text-transform: inherit;
#>   padding-top: 8px;
#>   padding-bottom: 8px;
#>   padding-left: 5px;
#>   padding-right: 5px;
#> }
#> 
#> #vlglhzldjq .gt_first_grand_summary_row {
#>   padding-top: 8px;
#>   padding-bottom: 8px;
#>   padding-left: 5px;
#>   padding-right: 5px;
#>   border-top-style: double;
#>   border-top-width: 6px;
#>   border-top-color: #D3D3D3;
#> }
#> 
#> #vlglhzldjq .gt_last_grand_summary_row_top {
#>   padding-top: 8px;
#>   padding-bottom: 8px;
#>   padding-left: 5px;
#>   padding-right: 5px;
#>   border-bottom-style: double;
#>   border-bottom-width: 6px;
#>   border-bottom-color: #D3D3D3;
#> }
#> 
#> #vlglhzldjq .gt_striped {
#>   background-color: rgba(128, 128, 128, 0.05);
#> }
#> 
#> #vlglhzldjq .gt_table_body {
#>   border-top-style: solid;
#>   border-top-width: 2px;
#>   border-top-color: #D3D3D3;
#>   border-bottom-style: solid;
#>   border-bottom-width: 2px;
#>   border-bottom-color: #D3D3D3;
#> }
#> 
#> #vlglhzldjq .gt_footnotes {
#>   color: #333333;
#>   background-color: #FFFFFF;
#>   border-bottom-style: none;
#>   border-bottom-width: 2px;
#>   border-bottom-color: #D3D3D3;
#>   border-left-style: none;
#>   border-left-width: 2px;
#>   border-left-color: #D3D3D3;
#>   border-right-style: none;
#>   border-right-width: 2px;
#>   border-right-color: #D3D3D3;
#> }
#> 
#> #vlglhzldjq .gt_footnote {
#>   margin: 0px;
#>   font-size: 90%;
#>   padding-top: 4px;
#>   padding-bottom: 4px;
#>   padding-left: 5px;
#>   padding-right: 5px;
#> }
#> 
#> #vlglhzldjq .gt_sourcenotes {
#>   color: #333333;
#>   background-color: #FFFFFF;
#>   border-bottom-style: none;
#>   border-bottom-width: 2px;
#>   border-bottom-color: #D3D3D3;
#>   border-left-style: none;
#>   border-left-width: 2px;
#>   border-left-color: #D3D3D3;
#>   border-right-style: none;
#>   border-right-width: 2px;
#>   border-right-color: #D3D3D3;
#> }
#> 
#> #vlglhzldjq .gt_sourcenote {
#>   font-size: 90%;
#>   padding-top: 4px;
#>   padding-bottom: 4px;
#>   padding-left: 5px;
#>   padding-right: 5px;
#> }
#> 
#> #vlglhzldjq .gt_left {
#>   text-align: left;
#> }
#> 
#> #vlglhzldjq .gt_center {
#>   text-align: center;
#> }
#> 
#> #vlglhzldjq .gt_right {
#>   text-align: right;
#>   font-variant-numeric: tabular-nums;
#> }
#> 
#> #vlglhzldjq .gt_font_normal {
#>   font-weight: normal;
#> }
#> 
#> #vlglhzldjq .gt_font_bold {
#>   font-weight: bold;
#> }
#> 
#> #vlglhzldjq .gt_font_italic {
#>   font-style: italic;
#> }
#> 
#> #vlglhzldjq .gt_super {
#>   font-size: 65%;
#> }
#> 
#> #vlglhzldjq .gt_footnote_marks {
#>   font-size: 75%;
#>   vertical-align: 0.4em;
#>   position: initial;
#> }
#> 
#> #vlglhzldjq .gt_asterisk {
#>   font-size: 100%;
#>   vertical-align: 0;
#> }
#> 
#> #vlglhzldjq .gt_indent_1 {
#>   text-indent: 5px;
#> }
#> 
#> #vlglhzldjq .gt_indent_2 {
#>   text-indent: 10px;
#> }
#> 
#> #vlglhzldjq .gt_indent_3 {
#>   text-indent: 15px;
#> }
#> 
#> #vlglhzldjq .gt_indent_4 {
#>   text-indent: 20px;
#> }
#> 
#> #vlglhzldjq .gt_indent_5 {
#>   text-indent: 25px;
#> }
#> </style>
#>   <table class="gt_table" data-quarto-disable-processing="false" data-quarto-bootstrap="false">
#>   <thead>
#>     <tr class="gt_heading">
#>       <td colspan="16" class="gt_heading gt_title gt_font_normal gt_bottom_border" style>Accuracy Table</td>
#>     </tr>
#>     
#>     <tr class="gt_col_headings">
#>       <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id=".model_id">.model_id</th>
#>       <th class="gt_col_heading gt_columns_bottom_border gt_left" rowspan="1" colspan="1" scope="col" id=".model_desc">.model_desc</th>
#>       <th class="gt_col_heading gt_columns_bottom_border gt_left" rowspan="1" colspan="1" scope="col" id=".type">.type</th>
#>       <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="n">n</th>
#>       <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="mae_mean">mae_mean</th>
#>       <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="mae_sd">mae_sd</th>
#>       <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="mape_mean">mape_mean</th>
#>       <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="mape_sd">mape_sd</th>
#>       <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="mase_mean">mase_mean</th>
#>       <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="mase_sd">mase_sd</th>
#>       <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="smape_mean">smape_mean</th>
#>       <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="smape_sd">smape_sd</th>
#>       <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="rmse_mean">rmse_mean</th>
#>       <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="rmse_sd">rmse_sd</th>
#>       <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="rsq_mean">rsq_mean</th>
#>       <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="rsq_sd">rsq_sd</th>
#>     </tr>
#>   </thead>
#>   <tbody class="gt_table_body">
#>     <tr><td headers=".model_id" class="gt_row gt_right">1</td>
#> <td headers=".model_desc" class="gt_row gt_left">ARIMA(0,1,1)(0,1,1)[12]</td>
#> <td headers=".type" class="gt_row gt_left">Resamples</td>
#> <td headers="n" class="gt_row gt_right">6</td>
#> <td headers="mae_mean" class="gt_row gt_right">294.51</td>
#> <td headers="mae_sd" class="gt_row gt_right">121.98</td>
#> <td headers="mape_mean" class="gt_row gt_right">2.95</td>
#> <td headers="mape_sd" class="gt_row gt_right">1.27</td>
#> <td headers="mase_mean" class="gt_row gt_right">1.18</td>
#> <td headers="mase_sd" class="gt_row gt_right">0.56</td>
#> <td headers="smape_mean" class="gt_row gt_right">2.94</td>
#> <td headers="smape_sd" class="gt_row gt_right">1.24</td>
#> <td headers="rmse_mean" class="gt_row gt_right">355.49</td>
#> <td headers="rmse_sd" class="gt_row gt_right">138.68</td>
#> <td headers="rsq_mean" class="gt_row gt_right">0.80</td>
#> <td headers="rsq_sd" class="gt_row gt_right">0.15</td></tr>
#>     <tr><td headers=".model_id" class="gt_row gt_right">2</td>
#> <td headers=".model_desc" class="gt_row gt_left">PROPHET</td>
#> <td headers=".type" class="gt_row gt_left">Resamples</td>
#> <td headers="n" class="gt_row gt_right">6</td>
#> <td headers="mae_mean" class="gt_row gt_right">458.05</td>
#> <td headers="mae_sd" class="gt_row gt_right">196.09</td>
#> <td headers="mape_mean" class="gt_row gt_right">4.59</td>
#> <td headers="mape_sd" class="gt_row gt_right">1.98</td>
#> <td headers="mase_mean" class="gt_row gt_right">1.85</td>
#> <td headers="mase_sd" class="gt_row gt_right">0.91</td>
#> <td headers="smape_mean" class="gt_row gt_right">4.55</td>
#> <td headers="smape_sd" class="gt_row gt_right">1.86</td>
#> <td headers="rmse_mean" class="gt_row gt_right">515.49</td>
#> <td headers="rmse_sd" class="gt_row gt_right">175.26</td>
#> <td headers="rsq_mean" class="gt_row gt_right">0.78</td>
#> <td headers="rsq_sd" class="gt_row gt_right">0.09</td></tr>
#>     <tr><td headers=".model_id" class="gt_row gt_right">3</td>
#> <td headers=".model_desc" class="gt_row gt_left">GLMNET</td>
#> <td headers=".type" class="gt_row gt_left">Resamples</td>
#> <td headers="n" class="gt_row gt_right">6</td>
#> <td headers="mae_mean" class="gt_row gt_right">706.10</td>
#> <td headers="mae_sd" class="gt_row gt_right">248.29</td>
#> <td headers="mape_mean" class="gt_row gt_right">7.16</td>
#> <td headers="mape_sd" class="gt_row gt_right">2.62</td>
#> <td headers="mase_mean" class="gt_row gt_right">2.80</td>
#> <td headers="mase_sd" class="gt_row gt_right">1.11</td>
#> <td headers="smape_mean" class="gt_row gt_right">6.92</td>
#> <td headers="smape_sd" class="gt_row gt_right">2.41</td>
#> <td headers="rmse_mean" class="gt_row gt_right">753.04</td>
#> <td headers="rmse_sd" class="gt_row gt_right">252.75</td>
#> <td headers="rsq_mean" class="gt_row gt_right">0.77</td>
#> <td headers="rsq_sd" class="gt_row gt_right">0.16</td></tr>
#>   </tbody>
#>   
#>   
#> </table>
#> </div>

# When summary_fns = NULL, returns the unsummarized resample results
m750_training_resamples_fitted %>%
    modeltime_resample_accuracy(
        summary_fns = NULL
    )
#> # A tibble: 18 × 10
#>    .model_id .model_desc  .resample_id .type   mae  mape  mase smape  rmse   rsq
#>        <int> <chr>        <chr>        <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#>  1         1 ARIMA(0,1,1… Slice1       Resa…  182.  1.79 0.637  1.80  212. 0.950
#>  2         1 ARIMA(0,1,1… Slice2       Resa…  330.  3.24 1.30   3.17  406. 0.729
#>  3         1 ARIMA(0,1,1… Slice3       Resa…  359.  3.57 1.55   3.64  415. 0.859
#>  4         1 ARIMA(0,1,1… Slice4       Resa…  456.  4.76 2.01   4.61  530. 0.561
#>  5         1 ARIMA(0,1,1… Slice5       Resa…  122.  1.23 0.524  1.22  165. 0.926
#>  6         1 ARIMA(0,1,1… Slice6       Resa…  317.  3.12 1.05   3.20  407. 0.763
#>  7         2 PROPHET      Slice1       Resa…  450.  4.54 1.57   4.40  509. 0.869
#>  8         2 PROPHET      Slice2       Resa…  449.  4.34 1.76   4.45  494. 0.745
#>  9         2 PROPHET      Slice3       Resa…  475.  4.72 2.05   4.85  556. 0.660
#> 10         2 PROPHET      Slice4       Resa…  317.  3.33 1.39   3.26  362. 0.781
#> 11         2 PROPHET      Slice5       Resa…  813.  8.22 3.49   7.89  829. 0.897
#> 12         2 PROPHET      Slice6       Resa…  244.  2.40 0.808  2.45  344. 0.755
#> 13         3 GLMNET       Slice1       Resa…  893.  8.90 3.12   8.48  926. 0.845
#> 14         3 GLMNET       Slice2       Resa…  583.  5.73 2.29   5.53  647. 0.654
#> 15         3 GLMNET       Slice3       Resa…  874.  9.07 3.77   8.62  917. 0.901
#> 16         3 GLMNET       Slice4       Resa…  964. 10.1  4.24   9.53 1022. 0.494
#> 17         3 GLMNET       Slice5       Resa…  313.  3.17 1.34   3.11  339. 0.918
#> 18         3 GLMNET       Slice6       Resa…  609.  6.03 2.02   6.26  667. 0.783