| detect_bias_drift | R Documentation |
Splits the test window into n_splits sequential, roughly-equal chunks
(oldest first) and computes compute_forecast_bias() in each – a
simple, explainable drift signal (is |bias| growing chunk over chunk),
not a full statistical trend test.
detect_bias_drift(fc_tib, test_df, n_splits = 2)
fc_tib |
A tibble with |
test_df |
A tibble with |
n_splits |
Integer, how many sequential chunks to split the window
into. Default |
A list with chunks (a tibble of chunk/bias/pct_bias/n,
one row per chunk) and drifting (TRUE if |bias| strictly
increases chunk over chunk, FALSE if not, NA if there isn't enough
data for a read).
ds <- as.Date("2024-01-01") + 0:9
fc_tib <- tibble::tibble(ds = ds, yhat = c(rep(10, 5), rep(6, 5)))
test_df <- tibble::tibble(ds = ds, y = rep(10, 10))
detect_bias_drift(fc_tib, test_df, n_splits = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.