Feeds a new batch of observations (any size, including 1 — stream mode)
to the detector and returns a NEW fitted object with the engine state
advanced and the annotated batch appended to the history (truncated to the
last keep rows of the spec). The original object is not modified. This
is the only way to persist state; see augment() for a read-only preview.
Usage
advance(object, ...)
# S3 method for class 'drift_detector_fit'
advance(object, new_data, ...)Details
Why not update(): in the tidymodels ecosystem update() on a spec
means "change hyperparameters", so deriva defines its own verb.
Examples
base <- sim_drift_stream(n_pre = 100, n_post = 0, seed = 1)
f0 <- fit(drift_detector("ddm"), base, signal = error)
f1 <- advance(f0, sim_drift_stream(n_pre = 0, n_post = 50, seed = 2))
