Title: | Drift Adaptable Models |
---|---|
Description: | By analyzing streaming datasets, it is possible to observe significant changes in the data distribution or models' accuracy during their prediction (concept drift). The goal of 'heimdall' is to measure when concept drift occurs. The package makes available several state-of-the-art methods. It also tackles how to adapt models in a nonstationary context. Some concept drifts methods are described in Tavares (2022) <doi:10.1007/s12530-021-09415-z>. |
Authors: | Lucas Tavares [aut], Leonardo Carvalho [aut], Diego Carvalho [aut], Esther Pacitti [aut], Fabio Porto [aut], Eduardo Ogasawara [aut, ths, cre] , Federal Center for Technological Education of Rio de Janeiro (CEFET/RJ) [cph] |
Maintainer: | Eduardo Ogasawara <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.0.717 |
Built: | 2024-11-11 02:22:39 UTC |
Source: | https://github.com/cefet-rj-dal/heimdall |
Adaptive Windowing method for concept drift detection doi:10.1137/1.9781611972771.42.
dfr_adwin(target_feat = NULL, delta = 2e-05)
dfr_adwin(target_feat = NULL, delta = 2e-05)
target_feat |
Feature to be monitored. |
delta |
The significance parameter for the ADWIN algorithm. |
dfr_adwin
object
#Use the same example of dfr_cumsum changing the constructor to: #model <- dfr_adwin(target_feat='serie')
#Use the same example of dfr_cumsum changing the constructor to: #model <- dfr_adwin(target_feat='serie')
Autoencoder-Based method for concept drift detection doi:0.1109/ICDMW58026.2022.00109.
dfr_aedd( features, input_size, encoding_size, batch_size = 32, num_epochs = 1000, learning_rate = 0.001, window_size = 100, monitoring_step = 1700, criteria = "mann_whitney" )
dfr_aedd( features, input_size, encoding_size, batch_size = 32, num_epochs = 1000, learning_rate = 0.001, window_size = 100, monitoring_step = 1700, criteria = "mann_whitney" )
features |
Features to be monitored |
input_size |
Input size |
encoding_size |
Encoding Size |
batch_size |
Batch Size for batch learning |
num_epochs |
Number of Epochs for training |
learning_rate |
Learning Rate |
window_size |
Size of the most recent data to be used |
monitoring_step |
The number of rows that the drifter waits to be is updated |
criteria |
The method to be used to check if there is a drift. May be mann_whitney (default) or kolmogorov_smirnov |
dfr_aedd
object
Convolutional Autoencoder-Based method for concept drift detection doi:0.1109/ICDMW58026.2022.00109.
dfr_caedd( features, input_size, encoding_size, batch_size = 32, num_epochs = 1000, learning_rate = 0.001, window_size = 100, monitoring_step = 1700, criteria = "mann_whitney" )
dfr_caedd( features, input_size, encoding_size, batch_size = 32, num_epochs = 1000, learning_rate = 0.001, window_size = 100, monitoring_step = 1700, criteria = "mann_whitney" )
features |
Features to be monitored |
input_size |
Input size |
encoding_size |
Encoding Size |
batch_size |
Batch Size for batch learning |
num_epochs |
Number of Epochs for training |
learning_rate |
Learning Rate |
window_size |
Size of the most recent data to be used |
monitoring_step |
The number of rows that the drifter waits to be is updated |
criteria |
The method to be used to check if there is a drift. May be mann_whitney (default) or kolmogorov_smirnov |
dfr_caedd
object
The cumulative sum (CUSUM) is a sequential analysis technique used for change detection.
dfr_cusum(lambda = 100)
dfr_cusum(lambda = 100)
lambda |
Necessary level for warning zone (2 standard deviation) |
dfr_cusum
object
library(daltoolbox) library(heimdall) # This example uses an error-based drift detector with a synthetic a # model residual where 1 is an error and 0 is a correct prediction. data(st_drift_examples) data <- st_drift_examples$univariate data$event <- NULL data$prediction <- st_drift_examples$univariate$serie > 4 model <- dfr_cusum() detection <- NULL output <- list(obj=model, drift=FALSE) for (i in 1:length(data$prediction)){ output <- update_state(output$obj, data$prediction[i]) if (output$drift){ type <- 'drift' output$obj <- reset_state(output$obj) }else{ type <- '' } detection <- rbind(detection, data.frame(idx=i, event=output$drift, type=type)) } detection[detection$type == 'drift',]
library(daltoolbox) library(heimdall) # This example uses an error-based drift detector with a synthetic a # model residual where 1 is an error and 0 is a correct prediction. data(st_drift_examples) data <- st_drift_examples$univariate data$event <- NULL data$prediction <- st_drift_examples$univariate$serie > 4 model <- dfr_cusum() detection <- NULL output <- list(obj=model, drift=FALSE) for (i in 1:length(data$prediction)){ output <- update_state(output$obj, data$prediction[i]) if (output$drift){ type <- 'drift' output$obj <- reset_state(output$obj) }else{ type <- '' } detection <- rbind(detection, data.frame(idx=i, event=output$drift, type=type)) } detection[detection$type == 'drift',]
Denoising Autoencoder-Based method for concept drift detection doi:0.1109/ICDMW58026.2022.00109.
dfr_daedd( features, input_size, encoding_size, batch_size = 32, num_epochs = 1000, learning_rate = 0.001, window_size = 100, monitoring_step = 1700, criteria = "mann_whitney" )
dfr_daedd( features, input_size, encoding_size, batch_size = 32, num_epochs = 1000, learning_rate = 0.001, window_size = 100, monitoring_step = 1700, criteria = "mann_whitney" )
features |
Features to be monitored |
input_size |
Input size |
encoding_size |
Encoding Size |
batch_size |
Batch Size for batch learning |
num_epochs |
Number of Epochs for training |
learning_rate |
Learning Rate |
window_size |
Size of the most recent data to be used |
monitoring_step |
The number of rows that the drifter waits to be is updated |
criteria |
The method to be used to check if there is a drift. May be mann_whitney (default) or kolmogorov_smirnov |
dfr_aedd
object
DDM is a concept change detection method based on the PAC learning model premise, that the learner’s error rate will decrease as the number of analysed samples increase, as long as the data distribution is stationary. doi:10.1007/978-3-540-28645-5_29.
dfr_ddm(min_instances = 30, warning_level = 2, out_control_level = 3)
dfr_ddm(min_instances = 30, warning_level = 2, out_control_level = 3)
min_instances |
The minimum number of instances before detecting change |
warning_level |
Necessary level for warning zone (2 standard deviation) |
out_control_level |
Necessary level for a positive drift detection |
dfr_ddm
object
library(daltoolbox) library(heimdall) # This example uses an error-based drift detector with a synthetic a # model residual where 1 is an error and 0 is a correct prediction. data(st_drift_examples) data <- st_drift_examples$univariate data$event <- NULL data$prediction <- st_drift_examples$univariate$serie > 4 model <- dfr_ddm() detection <- NULL output <- list(obj=model, drift=FALSE) for (i in 1:length(data$prediction)){ output <- update_state(output$obj, data$prediction[i]) if (output$drift){ type <- 'drift' output$obj <- reset_state(output$obj) }else{ type <- '' } detection <- rbind(detection, data.frame(idx=i, event=output$drift, type=type)) } detection[detection$type == 'drift',]
library(daltoolbox) library(heimdall) # This example uses an error-based drift detector with a synthetic a # model residual where 1 is an error and 0 is a correct prediction. data(st_drift_examples) data <- st_drift_examples$univariate data$event <- NULL data$prediction <- st_drift_examples$univariate$serie > 4 model <- dfr_ddm() detection <- NULL output <- list(obj=model, drift=FALSE) for (i in 1:length(data$prediction)){ output <- update_state(output$obj, data$prediction[i]) if (output$drift){ type <- 'drift' output$obj <- reset_state(output$obj) }else{ type <- '' } detection <- rbind(detection, data.frame(idx=i, event=output$drift, type=type)) } detection[detection$type == 'drift',]
ECDD is a concept change detection method that uses an exponentially weighted moving average (EWMA) chart to monitor the misclassification rate of an streaming classifier.
dfr_ecdd(lambda = 0.2, min_run_instances = 30, average_run_length = 100)
dfr_ecdd(lambda = 0.2, min_run_instances = 30, average_run_length = 100)
lambda |
The minimum number of instances before detecting change |
min_run_instances |
Necessary level for warning zone (2 standard deviation) |
average_run_length |
Necessary level for a positive drift detection |
dfr_ecdd
object
library(daltoolbox) library(heimdall) # This example uses a dist-based drift detector with a synthetic dataset. data(st_drift_examples) data <- st_drift_examples$univariate data$event <- NULL model <- dfr_ecdd() detection <- NULL output <- list(obj=model, drift=FALSE) for (i in 1:length(data$serie)){ output <- update_state(output$obj, data$serie[i]) if (output$drift){ type <- 'drift' output$obj <- reset_state(output$obj) }else{ type <- '' } detection <- rbind(detection, data.frame(idx=i, event=output$drift, type=type)) } detection[detection$type == 'drift',]
library(daltoolbox) library(heimdall) # This example uses a dist-based drift detector with a synthetic dataset. data(st_drift_examples) data <- st_drift_examples$univariate data$event <- NULL model <- dfr_ecdd() detection <- NULL output <- list(obj=model, drift=FALSE) for (i in 1:length(data$serie)){ output <- update_state(output$obj, data$serie[i]) if (output$drift){ type <- 'drift' output$obj <- reset_state(output$obj) }else{ type <- '' } detection <- rbind(detection, data.frame(idx=i, event=output$drift, type=type)) } detection[detection$type == 'drift',]
EDDM (Early Drift Detection Method) aims to improve the detection rate of gradual concept drift in DDM, while keeping a good performance against abrupt concept drift. doi:2747577a61c70bc3874380130615e15aff76339e
dfr_eddm( min_instances = 30, min_num_errors = 30, warning_level = 0.95, out_control_level = 0.9 )
dfr_eddm( min_instances = 30, min_num_errors = 30, warning_level = 0.95, out_control_level = 0.9 )
min_instances |
The minimum number of instances before detecting change |
min_num_errors |
The minimum number of errors before detecting change |
warning_level |
Necessary level for warning zone |
out_control_level |
Necessary level for a positive drift detection |
dfr_eddm
object
library(daltoolbox) library(heimdall) # This example uses an error-based drift detector with a synthetic a # model residual where 1 is an error and 0 is a correct prediction. data(st_drift_examples) data <- st_drift_examples$univariate data$event <- NULL data$prediction <- st_drift_examples$univariate$serie > 4 model <- dfr_eddm() detection <- NULL output <- list(obj=model, drift=FALSE) for (i in 1:length(data$prediction)){ output <- update_state(output$obj, data$prediction[i]) if (output$drift){ type <- 'drift' output$obj <- reset_state(output$obj) }else{ type <- '' } detection <- rbind(detection, data.frame(idx=i, event=output$drift, type=type)) } detection[detection$type == 'drift',]
library(daltoolbox) library(heimdall) # This example uses an error-based drift detector with a synthetic a # model residual where 1 is an error and 0 is a correct prediction. data(st_drift_examples) data <- st_drift_examples$univariate data$event <- NULL data$prediction <- st_drift_examples$univariate$serie > 4 model <- dfr_eddm() detection <- NULL output <- list(obj=model, drift=FALSE) for (i in 1:length(data$prediction)){ output <- update_state(output$obj, data$prediction[i]) if (output$drift){ type <- 'drift' output$obj <- reset_state(output$obj) }else{ type <- '' } detection <- rbind(detection, data.frame(idx=i, event=output$drift, type=type)) } detection[detection$type == 'drift',]
is a drift detection method based on the Hoeffding’s inequality. HDDM_A uses the average as estimator. doi:10.1109/TKDE.2014.2345382.
dfr_hddm( drift_confidence = 0.001, warning_confidence = 0.005, two_side_option = TRUE )
dfr_hddm( drift_confidence = 0.001, warning_confidence = 0.005, two_side_option = TRUE )
drift_confidence |
Confidence to the drift |
warning_confidence |
Confidence to the warning |
two_side_option |
Option to monitor error increments and decrements (two-sided) or only increments (one-sided) |
dfr_hddm
object
library(daltoolbox) library(heimdall) # This example uses an error-based drift detector with a synthetic a # model residual where 1 is an error and 0 is a correct prediction. data(st_drift_examples) data <- st_drift_examples$univariate data$event <- NULL data$prediction <- st_drift_examples$univariate$serie > 4 model <- dfr_hddm() detection <- NULL output <- list(obj=model, drift=FALSE) for (i in 1:length(data$prediction)){ output <- update_state(output$obj, data$prediction[i]) if (output$drift){ type <- 'drift' output$obj <- reset_state(output$obj) }else{ type <- '' } detection <- rbind(detection, data.frame(idx=i, event=output$drift, type=type)) } detection[detection$type == 'drift',]
library(daltoolbox) library(heimdall) # This example uses an error-based drift detector with a synthetic a # model residual where 1 is an error and 0 is a correct prediction. data(st_drift_examples) data <- st_drift_examples$univariate data$event <- NULL data$prediction <- st_drift_examples$univariate$serie > 4 model <- dfr_hddm() detection <- NULL output <- list(obj=model, drift=FALSE) for (i in 1:length(data$prediction)){ output <- update_state(output$obj, data$prediction[i]) if (output$drift){ type <- 'drift' output$obj <- reset_state(output$obj) }else{ type <- '' } detection <- rbind(detection, data.frame(idx=i, event=output$drift, type=type)) } detection[detection$type == 'drift',]
Implements Inactive Dummy Detector
dfr_inactive()
dfr_inactive()
Drifter object
# See ?hcd_ddm for an example of DDM drift detector
# See ?hcd_ddm for an example of DDM drift detector
Kullback Leibler Windowing method for concept drift detection.
dfr_kldist(target_feat = NULL, window_size = 100, p_th = 0.05, data = NULL)
dfr_kldist(target_feat = NULL, window_size = 100, p_th = 0.05, data = NULL)
target_feat |
Feature to be monitored. |
window_size |
Size of the sliding window (must be > 2*stat_size) |
p_th |
Probability theshold for the test statistic of the Kullback Leibler distance. |
data |
Already collected data to avoid cold start. |
dfr_kldist
object
library(daltoolbox) library(heimdall) # This example uses a dist-based drift detector with a synthetic dataset. data(st_drift_examples) data <- st_drift_examples$univariate data$event <- NULL model <- dfr_kldist(target_feat='serie') detection <- NULL output <- list(obj=model, drift=FALSE) for (i in 1:length(data$serie)){ output <- update_state(output$obj, data$serie[i]) if (output$drift){ type <- 'drift' output$obj <- reset_state(output$obj) }else{ type <- '' } detection <- rbind(detection, data.frame(idx=i, event=output$drift, type=type)) } detection[detection$type == 'drift',]
library(daltoolbox) library(heimdall) # This example uses a dist-based drift detector with a synthetic dataset. data(st_drift_examples) data <- st_drift_examples$univariate data$event <- NULL model <- dfr_kldist(target_feat='serie') detection <- NULL output <- list(obj=model, drift=FALSE) for (i in 1:length(data$serie)){ output <- update_state(output$obj, data$serie[i]) if (output$drift){ type <- 'drift' output$obj <- reset_state(output$obj) }else{ type <- '' } detection <- rbind(detection, data.frame(idx=i, event=output$drift, type=type)) } detection[detection$type == 'drift',]
Kolmogorov-Smirnov Windowing method for concept drift detection doi:10.1016/j.neucom.2019.11.111.
dfr_kswin( target_feat = NULL, window_size = 1500, stat_size = 500, alpha = 1e-07, data = NULL )
dfr_kswin( target_feat = NULL, window_size = 1500, stat_size = 500, alpha = 1e-07, data = NULL )
target_feat |
Feature to be monitored. |
window_size |
Size of the sliding window (must be > 2*stat_size) |
stat_size |
Size of the statistic window |
alpha |
Probability for the test statistic of the Kolmogorov-Smirnov-Test The alpha parameter is very sensitive, therefore should be set below 0.01. |
data |
Already collected data to avoid cold start. |
dfr_kswin
object
library(daltoolbox) library(heimdall) # This example uses a dist-based drift detector with a synthetic dataset. data(st_drift_examples) data <- st_drift_examples$univariate data$event <- NULL model <- dfr_kswin(target_feat='serie') detection <- NULL output <- list(obj=model, drift=FALSE) for (i in 1:length(data$serie)){ output <- update_state(output$obj, data$serie[i]) if (output$drift){ type <- 'drift' output$obj <- reset_state(output$obj) }else{ type <- '' } detection <- rbind(detection, data.frame(idx=i, event=output$drift, type=type)) } detection[detection$type == 'drift',]
library(daltoolbox) library(heimdall) # This example uses a dist-based drift detector with a synthetic dataset. data(st_drift_examples) data <- st_drift_examples$univariate data$event <- NULL model <- dfr_kswin(target_feat='serie') detection <- NULL output <- list(obj=model, drift=FALSE) for (i in 1:length(data$serie)){ output <- update_state(output$obj, data$serie[i]) if (output$drift){ type <- 'drift' output$obj <- reset_state(output$obj) }else{ type <- '' } detection <- rbind(detection, data.frame(idx=i, event=output$drift, type=type)) } detection[detection$type == 'drift',]
Mean Comparison statistical method for concept drift detection.
dfr_mcdd(target_feat = NULL, alpha = 1e-08, window_size = 1500)
dfr_mcdd(target_feat = NULL, alpha = 1e-08, window_size = 1500)
target_feat |
Feature to be monitored |
alpha |
Probability theshold for all test statistics |
window_size |
Size of the sliding window |
dfr_mcdd
object
library(daltoolbox) library(heimdall) # This example uses a dist-based drift detector with a synthetic dataset. data(st_drift_examples) data <- st_drift_examples$univariate data$event <- NULL model <- dfr_mcdd(target_feat='depart_visibility') detection <- NULL output <- list(obj=model, drift=FALSE) for (i in 1:length(data$serie)){ output <- update_state(output$obj, data$serie[i]) if (output$drift){ type <- 'drift' output$obj <- reset_state(output$obj) }else{ type <- '' } detection <- rbind(detection, data.frame(idx=i, event=output$drift, type=type)) } detection[detection$type == 'drift',]
library(daltoolbox) library(heimdall) # This example uses a dist-based drift detector with a synthetic dataset. data(st_drift_examples) data <- st_drift_examples$univariate data$event <- NULL model <- dfr_mcdd(target_feat='depart_visibility') detection <- NULL output <- list(obj=model, drift=FALSE) for (i in 1:length(data$serie)){ output <- update_state(output$obj, data$serie[i]) if (output$drift){ type <- 'drift' output$obj <- reset_state(output$obj) }else{ type <- '' } detection <- rbind(detection, data.frame(idx=i, event=output$drift, type=type)) } detection[detection$type == 'drift',]
Change-point detection method works by computing the observed values and their mean up to the current moment doi:10.2307/2333009.
dfr_page_hinkley( target_feat = NULL, min_instances = 30, delta = 0.005, threshold = 50, alpha = 1 - 1e-04 )
dfr_page_hinkley( target_feat = NULL, min_instances = 30, delta = 0.005, threshold = 50, alpha = 1 - 1e-04 )
target_feat |
Feature to be monitored. |
min_instances |
The minimum number of instances before detecting change |
delta |
The delta factor for the Page Hinkley test |
threshold |
The change detection threshold (lambda) |
alpha |
The forgetting factor, used to weight the observed value and the mean |
dfr_page_hinkley
object
library(daltoolbox) library(heimdall) # This example assumes a model residual where 1 is an error and 0 is a correct prediction. data(st_drift_examples) data <- st_drift_examples$univariate data$event <- NULL data$prediction <- st_drift_examples$univariate$serie > 4 model <- dfr_page_hinkley(target_feat='serie') detection <- c() output <- list(obj=model, drift=FALSE) for (i in 1:length(data$serie)){ output <- update_state(output$obj, data$serie[i]) if (output$drift){ type <- 'drift' output$obj <- reset_state(output$obj) }else{ type <- '' } detection <- rbind(detection, list(idx=i, event=output$drift, type=type)) } detection <- as.data.frame(detection) detection[detection$type == 'drift',]
library(daltoolbox) library(heimdall) # This example assumes a model residual where 1 is an error and 0 is a correct prediction. data(st_drift_examples) data <- st_drift_examples$univariate data$event <- NULL data$prediction <- st_drift_examples$univariate$serie > 4 model <- dfr_page_hinkley(target_feat='serie') detection <- c() output <- list(obj=model, drift=FALSE) for (i in 1:length(data$serie)){ output <- update_state(output$obj, data$serie[i]) if (output$drift){ type <- 'drift' output$obj <- reset_state(output$obj) }else{ type <- '' } detection <- rbind(detection, list(idx=i, event=output$drift, type=type)) } detection <- as.data.frame(detection) detection[detection$type == 'drift',]
Implements Passive Dummy Detector
dfr_passive()
dfr_passive()
Drifter object
# See ?hcd_ddm for an example of DDM drift detector
# See ?hcd_ddm for an example of DDM drift detector
Stacked Autoencoder-Based method for concept drift detection doi:0.1109/ICDMW58026.2022.00109.
dfr_saedd( features, input_size, encoding_size, batch_size = 32, num_epochs = 1000, learning_rate = 0.001, window_size = 100, monitoring_step = 1700, criteria = "mann_whitney" )
dfr_saedd( features, input_size, encoding_size, batch_size = 32, num_epochs = 1000, learning_rate = 0.001, window_size = 100, monitoring_step = 1700, criteria = "mann_whitney" )
features |
Features to be monitored |
input_size |
Input size |
encoding_size |
Encoding Size |
batch_size |
Batch Size for batch learning |
num_epochs |
Number of Epochs for training |
learning_rate |
Learning Rate |
window_size |
Size of the most recent data to be used |
monitoring_step |
The number of rows that the drifter waits to be is updated |
criteria |
The method to be used to check if there is a drift. May be mann_whitney (default) or kolmogorov_smirnov |
dfr_saedd
object
Variational Autoencoder-Based method for concept drift detection doi:0.1109/ICDMW58026.2022.00109.
dfr_vaedd( features, input_size, encoding_size, batch_size = 32, num_epochs = 1000, learning_rate = 0.001, window_size = 100, monitoring_step = 1700, criteria = "mann_whitney" )
dfr_vaedd( features, input_size, encoding_size, batch_size = 32, num_epochs = 1000, learning_rate = 0.001, window_size = 100, monitoring_step = 1700, criteria = "mann_whitney" )
features |
Features to be monitored |
input_size |
Input size |
encoding_size |
Encoding Size |
batch_size |
Batch Size for batch learning |
num_epochs |
Number of Epochs for training |
learning_rate |
Learning Rate |
window_size |
Size of the most recent data to be used |
monitoring_step |
The number of rows that the drifter waits to be is updated |
criteria |
The method to be used to check if there is a drift. May be mann_whitney (default) or kolmogorov_smirnov |
dfr_vaedd
object
Implements Distribution Based drift detectors
dist_based(target_feat)
dist_based(target_feat)
target_feat |
Feature to be monitored. |
Drifter object
Ancestor class for drift detection
drifter()
drifter()
Drifter object
# See ?dd_ddm for an example of DDM drift detector
# See ?dd_ddm for an example of DDM drift detector
Implements Error Based drift detectors
error_based()
error_based()
Drifter object
# See ?hcd_ddm for an example of DDM drift detector
# See ?hcd_ddm for an example of DDM drift detector
Process Batch
## S3 method for class 'drifter' fit(obj, data, prediction, ...)
## S3 method for class 'drifter' fit(obj, data, prediction, ...)
obj |
Drifter object |
data |
data batch in data frame format |
prediction |
prediction batch as vector format |
... |
opitional arguments |
updated Drifter object
Ancestor class for metric calculation
metric()
metric()
Metric object
# See ?metric for an example of DDM drift detector
# See ?metric for an example of DDM drift detector
Class for accuracy calculation
mt_accuracy()
mt_accuracy()
Metric object
# See ?mt_accuracy for an example of Accuracy Calculator
# See ?mt_accuracy for an example of Accuracy Calculator
Class for FScore calculation
mt_fscore(f = 1)
mt_fscore(f = 1)
f |
The F parameter for the F-Score metric |
Metric object
# See ?mt_precision for an example of FScore Calculator
# See ?mt_precision for an example of FScore Calculator
Class for precision calculation
mt_precision()
mt_precision()
Metric object
# See ?mt_precision for an example of Precision Calculator
# See ?mt_precision for an example of Precision Calculator
Class for recall calculation
mt_recall()
mt_recall()
Metric object
# See ?mt_recall for an example of Recall Calculator
# See ?mt_recall for an example of Recall Calculator
Implements Multi Criteria drift detectors
multi_criteria()
multi_criteria()
Drifter object
Implements Multivariate Distribution Based drift detectors
mv_dist_based(features)
mv_dist_based(features)
features |
Features to be monitored. |
Drifter object
Reset Drifter State
reset_state(obj)
reset_state(obj)
obj |
Drifter object |
updated Drifter object
# See ?hcd_ddm for an example of DDM drift detector
# See ?hcd_ddm for an example of DDM drift detector
A list of multivariate time series for drift detection
example1: a bivariate dataset with one multivariate concept drift example
#'
data(st_drift_examples)
data(st_drift_examples)
A list of time series.
data(st_drift_examples) dataset <- st_drift_examples$example1
data(st_drift_examples) dataset <- st_drift_examples$example1
Ancestor class for drift adaptive models
stealthy( model, drift_method, th = 0.5, target_uni_drifter = FALSE, verbose = FALSE )
stealthy( model, drift_method, th = 0.5, target_uni_drifter = FALSE, verbose = FALSE )
model |
The algorithm object to be used for predictions |
drift_method |
The algorithm object to detect drifts |
th |
The threshold to be used with classification algorithms |
target_uni_drifter |
Passes the prediction target to the drifts as the target feat when the drifter is univariate and dist_based. |
verbose |
if TRUE shows drift messages |
Stealthy object
# See ?dd_ddm for an example of DDM drift detector
# See ?dd_ddm for an example of DDM drift detector
Update Drifter State
update_state(obj, value)
update_state(obj, value)
obj |
Drifter object |
value |
a value that represents a processed batch |
updated Drifter object
# See ?hcd_ddm for an example of DDM drift detector
# See ?hcd_ddm for an example of DDM drift detector