drifter_input: Drifter monitoring input

View source: R/ac_drifter.R

drifter_inputR Documentation

Drifter monitoring input

Description

Builds the signal a detector monitors from a prepared batch, so that model wrappers (such as adp_retrain() and adp_recurrent()) feed every detector family the same way, without branching on the detector's class. Each family implements its own method; a new detector inherits the right behaviour by belonging to a family (error_based, dist_based, mv_dist_based, multi_criteria) or falls back to the default, which feeds the whole batch (this also covers the dummy baselines dfr_passive() and dfr_inactive(), whose own update_state() decides whether a drift is reported).

Usage

drifter_input(obj, ctx)

Arguments

obj

Drifter object.

ctx

A list with the prepared batch and the prediction context: features (the one-hot encoded, normalized batch) and, for error-based detectors, model, y (labels) and th (threshold). A wrapper may set target_uni = TRUE so a univariate distance detector monitors the binary label instead of a feature.

Value

A list with value, the signal passed to fit(), and rows, the indices of the batch rows that value covers (every row, except error-based detectors, which skip rows without a prediction).

Examples

ctx <- list(features = data.frame(a = rnorm(10), b = rnorm(10)))
drifter_input(dfr_inactive(), ctx)$rows

heimdall documentation built on Dec. 2, 2026, 5:08 p.m.