HDBSCANDetector<T>
Models & Types · AiDotNet.AnomalyDetection.ClusterBased
Detects anomalies using HDBSCAN (Hierarchical DBSCAN).
Inheritance: ModelBase<T, Matrix<T>, Vector<T>> → AnomalyDetectorBase<T> → HDBSCANDetector<T>
Implements: IGeneratedParameterRegistrar<T>
For Beginners
HDBSCAN is an improved version of DBSCAN that automatically finds clusters of varying densities without requiring an epsilon parameter.
How It Works
The algorithm works by:
- Compute core distances for each point
- Build a mutual reachability graph
- Construct a minimum spanning tree
- Extract a cluster hierarchy
- Points not in any cluster are anomalies
When to use:
- When clusters have varying densities
- When you don’t want to tune epsilon
- Complex data structures with hierarchical cluster patterns
Industry Standard Defaults:
- Min cluster size: 5
- Min samples: 5
- Contamination: 0.1 (10%)
Reference: Campello, R., et al. (2013). “Density-Based Clustering Based on Hierarchical Density Estimates.” PAKDD.
Constructors
| Constructor | Summary |
|---|---|
HDBSCANDetector(int minClusterSize, int minSamples, double contamination, int randomSeed) |
Creates a new HDBSCAN anomaly detector. |
Properties
| Property | Summary |
|---|---|
int MinClusterSize { get; } |
Gets the minimum cluster size. |
int MinSamples { get; } |
Gets the minimum number of samples for core points. |
Methods
| Method | Summary |
|---|---|
Vector<T> ScoreAnomalies(Matrix<T> X) |
|
void Fit(Matrix<T> X) |