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:

  1. Create a detector with your desired parameters
  2. Call Fit to train the detector on “normal” data
  3. Call Predict to identify outliers in new data
  4. Optionally use DecisionFunction to 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.