Skip to main content

Module dbscan

Module dbscan 

Source
Expand description

§DBSCAN Anomaly Detection for Episodes

This module implements the DBSCAN (Density-Based Spatial Clustering of Applications with Noise) algorithm for detecting anomalous episodes.

DBSCAN is ideal for this use case because:

  • It doesn’t require specifying the number of clusters upfront
  • It naturally identifies outliers as noise (points not belonging to any cluster)
  • It can find clusters of arbitrary shape

§Usage

use do_memory_core::patterns::DBSCANAnomalyDetector;

let detector = DBSCANAnomalyDetector::new();
// Use in async context:
// let anomalies = detector.detect_anomalies(&episodes).await;

§Integration

The detector is integrated into the learning cycle and can be called during episode completion to identify unusual patterns.

Re-exports§

pub use detector::DBSCANAnomalyDetector;
pub use types::Anomaly;
pub use types::AnomalyReason;
pub use types::ClusterCentroid;
pub use types::DBSCANClusterResult;
pub use types::DBSCANConfig;
pub use types::DBSCANStats;
pub use types::EpisodeCluster;
pub use types::FeatureWeights;

Modules§

algorithms
DBSCAN Algorithm Implementation
detector
DBSCAN Anomaly Detector
tests
DBSCAN Tests
types
DBSCAN Types