Binary Drift Detector: McDiarmid Drift Detection Method#1703
Binary Drift Detector: McDiarmid Drift Detection Method#1703aditya0by0 wants to merge 8 commits intoonline-ml:mainfrom
Conversation
- hence no need to explicit pop left
- instead of handling this internally, needs to be mentioned in doc
| if self.drift_detected: | ||
| self._reset() | ||
|
|
||
| self._sliding_window.append(0 if x == 1 else 1) |
There was a problem hiding this comment.
I'm still confused about the input values for correct prediction and incorrect prediction as mentioned in #1532. Can someone please help me out with this ?
There was a problem hiding this comment.
Hi @aditya0by0. Multiple classic drift detectors seem to use a binary loss scheme, but there might be other patterns nowadays. I am not aware of the specifics of the algorithms you are contributing.
There was a problem hiding this comment.
ok I will check further on it. Btw the following is the corresponding moa code for the algorithm from the author : https://github.com/alipsgh/codes-for-moa/blob/master/drift_detection/MDDM_A.java
There was a problem hiding this comment.
Hi @aditya0by0,
Are there any news on this PR?
Would love to see it in river!
There was a problem hiding this comment.
Hi @kulbachcedric, I have implemented the algorithm. But I am unable to figure out the right test cases for it.
Because for the existing test data streams of river, the algorithm detects drifts at almost all the timepoints.
river/river/drift/test_drift_detectors.py
Lines 11 to 27 in 05316d4
For the same stream of data I verified it with the author's corresponding python implementations and didn't get any better results. (which might be an indicator that this detector might be worse than the drift detectors which are already provided by river)
- https://github.com/alipsgh/tornado/blob/master/drift_detection/mddm_a.py
- https://github.com/alipsgh/tornado/blob/master/drift_detection/mddm_e.py
- https://github.com/alipsgh/tornado/blob/master/drift_detection/mddm_g.py
For these reasons, I am sure whether to pursue it any further.
PR for Discussion : #1672
Add McDiarmid Drift Detection Methods (MDDM)
Summary
Implements three new binary drift detectors based on McDiarmid's inequality:
MDDM_A– Arithmetic weighting (linear).MDDM_E– Exponential weighting.MDDM_G– Geometric weighting.