LoOPDetector<T>
Models & Types · AiDotNet.AnomalyDetection.DistanceBased
Detects anomalies using Local Outlier Probability (LoOP).
Inheritance: ModelBase<T, Matrix<T>, Vector<T>> → AnomalyDetectorBase<T> → LoOPDetector<T>
Implements: IGeneratedParameterRegistrar<T>
For Beginners
LoOP improves on LOF by providing a probability score between 0 and 1, making results easier to interpret. A score of 0 means the point is definitely not an outlier, while 1 means it’s definitely an outlier.
How It Works
The algorithm works by:
- Compute probabilistic set distance (PLOF) using Gaussian error function
- Normalize using local standard deviation of LOF values
- Convert to probability using error function
When to use:
- When you need interpretable probability scores
- When comparing outlier scores across different datasets
- Similar use cases as LOF but with better interpretability
Industry Standard Defaults:
- K (neighbors): 10
- Lambda: 3 (controls sensitivity)
- Contamination: 0.1 (10%)
Reference: Kriegel, H., et al. (2009). “LoOP: Local Outlier Probabilities.” CIKM.
Constructors
| Constructor | Summary |
|---|---|
LoOPDetector(int k, double lambda, double contamination, int randomSeed) |
Creates a new LoOP anomaly detector. |
Properties
| Property | Summary |
|---|---|
double Lambda { get; } |
Gets the lambda parameter (standard deviations for probability). |
int K { get; } |
Gets the number of neighbors used for detection. |
Methods
| Method | Summary |
|---|---|
Vector<T> ScoreAnomalies(Matrix<T> X) |
|
void Fit(Matrix<T> X) |