IOutlierDetector<T>
Interfaces · AiDotNet.Interfaces
Defines methods for algorithmic outlier/anomaly detection using a fit-predict pattern.
For Beginners
This interface provides a machine learning-style approach to outlier detection. Unlike simple statistical methods (like Z-score or IQR), algorithmic detectors learn patterns from your data and can detect more complex types of anomalies.
How It Works
The typical workflow is:
- Create a detector with your desired parameters
- Call
Fitto train the detector on “normal” data - Call
Predictto identify outliers in new data - Optionally use
DecisionFunctionto get anomaly scores
Properties
| Property | Summary |
|---|---|
T Threshold { get; } |
Gets the threshold used to classify samples as inliers or outliers. |
bool IsFitted { get; } |
Gets a value indicating whether the detector has been fitted to data. |
Methods
| Method | Summary |
|---|---|
Vector<T> DecisionFunction(Matrix<T> X) |
Computes the anomaly score for each sample. |
Vector<T> Predict(Matrix<T> X) |
Predicts whether each sample is an inlier or outlier. |
void Fit(Matrix<T> X) |
Trains the outlier detector on the provided data. |