AveragingDetector<T>
Models & Types · AiDotNet.AnomalyDetection.Ensemble
Combines multiple anomaly detectors using score averaging.
Inheritance: ModelBase<T, Matrix<T>, Vector<T>> → AnomalyDetectorBase<T> → AveragingDetector<T>
Implements: IGeneratedParameterRegistrar<T>
For Beginners
This ensemble method combines the predictions of multiple anomaly detectors by averaging their normalized scores. This is one of the simplest and most effective ensemble techniques.
How It Works
The algorithm works by:
- Train each base detector on the data
- Normalize scores from each detector to [0,1]
- Average the normalized scores
- Points with high average score are anomalies
When to use:
- When you want robust predictions from multiple detectors
- To reduce variance in anomaly scores
- As a simple baseline ensemble
Industry Standard Defaults:
- Default detectors: LOF, IsolationForest, KNN
- Contamination: 0.1 (10%)
Constructors
| Constructor | Summary |
|---|---|
AveragingDetector(double contamination, int randomSeed) |
Creates a new Averaging ensemble anomaly detector with default base detectors. |
Methods
| Method | Summary |
|---|---|
Vector<T> ScoreAnomalies(Matrix<T> X) |
|
void Fit(Matrix<T> X) |