Add moving average option for ML classifiers (fixes #640) - #858
Open
samerzumot wants to merge 3 commits into
Open
Add moving average option for ML classifiers (fixes #640)#858samerzumot wants to merge 3 commits into
samerzumot wants to merge 3 commits into
Conversation
- Implement MovingAverageClassifier in C++ core supporting custom scores and built-in metric models - Add MOVING_AVERAGE_CLASSIFIER enum across Python, Java, C#, TypeScript, Rust, Swift, Julia, and MATLAB bindings - Add automated test moving_average_classifier.py
Andrey1994
self-requested a review
September 1, 2026 22:22
Andrey1994
requested changes
Sep 1, 2026
Andrey1994
left a comment
Member
There was a problem hiding this comment.
Hi, I was thinking about adding moving average option to already existing classifiers instead of adding a new classifier type.
To enable it or not other_info field can be used.
In terms of implementation will need to think how to make it generic and uniform for all classifier types
- Remove MOVING_AVERAGE_CLASSIFIER enum across all language bindings - Implement generic moving average smoothing in BaseClassifier using NVI pattern - Support moving average configuration via other_info (JSON, key-value, integer) - Support multi-channel smoothing with bounded window history - Update automated tests for existing classifiers with moving average
…est, newline and BOM fixes - Make BaseClassifier public NVI methods non-virtual - Document other_info moving average behavior for DynLibClassifier plugin authors - Add multi-element vector output moving average test with DynLibClassifier - Fix missing trailing newlines in mindfulness_classifier.cpp and BrainFlowClassifiers.m - Remove BOM in C# library file to clean up diff
Author
|
Hi @Andrey1994, Thanks for the feedback! I've updated the implementation according to your suggestion:
Please take a look when you get a chance! |
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.
MovingAverageClassifierin C++ core supporting custom scores and built-in metric modelsMOVING_AVERAGE_CLASSIFIERenum across Python, Java, C#, TypeScript, Rust, Swift, Julia, and MATLAB bindingsmoving_average_classifier.py