concept_pool: Concept pool

View source: R/ac_manager.R

concept_poolR Documentation

Concept pool

Description

Stores concepts in slots and, on drift, asks its selector for a stored concept that fits the current batch (check_concept()). It also decides when the selector records the current batch in the learned limits of the active concept (history_order) and how the limits of a new concept start (history_init). Both only apply to learned limits: with a fixed limit (e.g. slct_psi(max_psi = 0.25)) the selector keeps no history.

Usage

concept_pool(
  model_selector,
  model_deleter,
  n_slots = 1,
  history_order = c("before", "after"),
  history_init = c("none", "blocks")
)

Arguments

model_selector

Selector that chooses the stored concept to reuse.

model_deleter

Evictor that chooses the slot to replace when every slot is used.

n_slots

Number of slots.

history_order

"before" (default): the active concept records the batch before the drift decision. "after": the decision uses the previous batches only; the batch is then recorded in the concept that stays active (if it already has a model). Requires history_init = "blocks" (the learned limits must start with values from the training window).

history_init

"none" (default): the history of a new concept starts empty. "blocks": it starts with the PSI of each batch-sized block of the concept's training window against the rest of the window. Applies to the PSI limits of the selector and of the REMIND check, and requires a REMIND train_size of at least two batches. The error tolerance of slct_error_metrics() (alone or inside slct_psi_then_error()) also starts by blocks only when the selector is created with init_blocks = TRUE (one model per block; see init_history.slct_error_metrics).

Value

A concept_pool object.


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