dfr_mcdd {heimdall}R Documentation

Mean Comparison Distance method

Description

Mean Comparison statistical method for concept drift detection.

Usage

dfr_mcdd(target_feat, alpha = 0.05, window_size = 100)

Arguments

target_feat

Feature to be monitored

alpha

Probability theshold for all test statistics

window_size

Size of the sliding window

Value

dfr_mcdd object

Examples

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',]

[Package heimdall version 1.0.717 Index]