Context
src/algorithm_pattern_classifier/classifiers/ is currently empty. Once multiple BaseDetector implementations exist (#2, #3, ...), something needs to combine their outputs into a single, ranked answer — a piece of code can plausibly match more than one pattern (e.g. a DP solution that also looks like a nested loop).
What
Implement a BaseClassifier that:
- Runs all registered detectors against the parsed source.
- Aggregates the individual detector outputs (which may each independently claim a match) into a ranked list of
ClassificationResults with a combined confidence score.
- Handles ties/overlaps sensibly (e.g. a DP solution shouldn't also be reported as a generic "nested loop" pattern if a more specific detector matched).
Depends on #1, and benefits from having at least two detectors (#2, #3) implemented to test aggregation against.
Acceptance Criteria
Context
src/algorithm_pattern_classifier/classifiers/is currently empty. Once multipleBaseDetectorimplementations exist (#2, #3, ...), something needs to combine their outputs into a single, ranked answer — a piece of code can plausibly match more than one pattern (e.g. a DP solution that also looks like a nested loop).What
Implement a
BaseClassifierthat:ClassificationResults with a combined confidence score.Depends on #1, and benefits from having at least two detectors (#2, #3) implemented to test aggregation against.
Acceptance Criteria