Skip to contents

Drops observations from the tail of the window while some split W = W0 . W1 has |mean(W0) - mean(W1)| >= eps_cut, where m = 1/(1/n0 + 1/n1), delta' = delta/n and eps_cut = sqrt(log(4/delta') / (2 m)).

Usage

Adwin(x, delta = 0.05)

Arguments

x

Stream values, expected in [0, 1].

delta

Confidence parameter in (0, 1).

Value

List with mean, width, window, ndrops, lastcut, changepoints, n, delta.

References

Bifet and Gavalda (2007), Proc. SIAM SDM, 443-448, Section 3 and Figure 1. Read from the authors' own PDF at www.cs.upc.edu/~gavalda.

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Adwin(V)
#> $mean
#> [1] 7
#> 
#> $width
#> [1] 3
#> 
#> $window
#> [1] 6 7 8
#> 
#> $ndrops
#> [1] 5
#> 
#> $lastcut
#> [1] 1.961007
#> 
#> $changepoints
#> [1] 3 4 5 6 7
#> 
#> $n
#> [1] 8
#> 
#> $delta
#> [1] 0.05
#> 
#> $method
#> [1] "ADWIN adaptive windowing (Bifet-Gavalda 2007 Sect. 3)"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"