| adp_recurrent | R Documentation |
Drift-adaptive classifier with concept management (the model formerly named REMIND).
A concept holds a model, its
preprocessors (one-hot and normalization), a data memory and a decision threshold.
At every labeled batch, fit() runs the drift detector, lets the concept_pool keep, reuse or create
a concept, and trains the active concept. predict() answers with the active concept or, with
check, with the concept chosen from the batch features alone.
A batch is usable when at least 1% of its rows are positive. A drift on a non-usable batch postpones the adaptation: the batch only enters the data windows.
adp_recurrent(
method,
drift_method,
model_manager = concept_pool_inactive(),
memory = memory_basic(),
trainer = train_static(),
train_size,
th = NULL,
check = NULL,
warmup_size = 100,
rare_policy = rare_keep(),
record_policy = rec_stable(),
check_rank = rank_ratio(),
preprocess = NULL,
verbose = FALSE
)
method |
Classifier used by every concept (e.g. |
drift_method |
Drift detector. |
model_manager |
Concept concept_pool: |
memory |
Memory prototype: stores the data window of each concept and balances the training data of every full training (first training and retrain). |
trainer |
Training activity: how a concept's model evolves after its first (full) training
(a variation point of the line). A |
train_size |
Number of rows needed to train a new concept. It is also the size of the sliding windows: the buffer of recent rows and the memory of each concept. |
th |
Decision threshold. |
check |
|
warmup_size |
Minimum number of rows to train a model, to run the drift detector and to apply the check. |
rare_policy |
Admission activity for labeled batches with < 1% positives (an optional activity
of the line). A |
record_policy |
Recording activity: which labeled batches enter the learned limits (an optional
activity of the line). A |
check_rank |
How the check picks the concept (a variation point of the line). A
|
preprocess |
Preprocessing of each concept: a |
verbose |
If |
A adp_recurrent object. After each fit() it exposes drifted, trained, postponed,
dropped, act_concept and the times time_drifter, time_adaptation, time_training,
time_threshold and total_time.
## Not run:
library(daltoolboxdp)
model <- adp_recurrent(
method = torch_cla_mlp("class", c("FALSE", "TRUE"), input_size = 10, hidden_sizes = 32L),
drift_method = dfr_passive(),
model_manager = concept_pool(slct_psi(n_tiles = 5), evt_least_used(), n_slots = 20),
memory = memory_undersampling(),
trainer = train_incremental(epochs = 5),
train_size = 5000,
check = slct_psi(n_tiles = 5, tol_quantile = 0.8)
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.