dfr_kswin {heimdall} | R Documentation |
KSWIN method
Description
Kolmogorov-Smirnov Windowing method for concept drift detection doi:10.1016/j.neucom.2019.11.111.
Usage
dfr_kswin(
target_feat,
window_size = 100,
stat_size = 30,
alpha = 0.005,
data = NULL
)
Arguments
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. |
Value
dfr_kswin
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_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',]
[Package heimdall version 1.0.717 Index]