feat(drift): add EDDM drift detector - #422
Open
nikolas-sapa wants to merge 1 commit into
Open
nikolas-sapa wants to merge 1 commit into
nikolas-sapa wants to merge 1 commit into
Conversation
Adds a CapyMOA wrapper for MOA's EDDM (Early Drift Detection Method). EDDM complements DDM: DDM monitors the error rate, EDDM monitors the distance between consecutive errors. The two often disagree: EDDM is more stable on noisy streams, DDM reacts faster when the error rate jumps. EDDM has no tuning parameters in MOA, so the wrapper only sets _moa_detector_type and documents usage with a deterministic example. Assisted-by: codebuff:deepseek-v4-flash
Collaborator
|
That doc test failure appears to be on our end (something probably updated). I will investigate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a CapyMOA wrapper for MOA's EDDM (Early Drift Detection Method).
EDDM complements DDM. DDM tracks the error rate. EDDM tracks the distance
between consecutive errors. The two often disagree: EDDM is more stable
on noisy streams, DDM reacts faster when the error rate jumps.
In a quick 10-seed check (error rate 1% -> 2% -> 4% -> 8% over 2000
points, changes at 500/1000/1500): EDDM detected all changes with zero
false alarms; DDM also detected all changes but raised 21 false alarms,
including two before the first change. Both are valid choices; they fail
differently.
Notes:
moa.classifiers.core.driftdetection.EDDM.string and
get_params()returns{}.followed by 1000 errors. EDDM flags drift at index 1030. Random
streams produced pre-change false alarms, so the example uses a
structured stream instead.
Testing:
uv run invoke fmtuv run pytest -q tests/test_detector.py(15 passed, 1 skipped)uv run pytest -q tests/test_eval_detector.py(11 passed)Assisted-by: codebuff:deepseek-v4-flash