| safe_compute_metrics | R Documentation |
Same as compute_forecast_metrics(), but checks actual_df's row count
first so callers don't need their own length guard before calling it.
safe_compute_metrics(forecast_df, actual_df, label)
forecast_df |
A tibble with |
actual_df |
A tibble with |
label |
Character scalar identifying this evaluation. |
A tibble with columns Set, Metric, Value (see
compute_forecast_metrics()).
ds <- as.Date("2024-01-01") + 0:9
forecast_df <- tibble::tibble(ds = ds, yhat = 1:10 + 0.5)
actual_df <- tibble::tibble(ds = ds, y = 1:10)
safe_compute_metrics(forecast_df, actual_df, label = "Test")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.