quantrs2_device/ml_optimization/
monitoring.rs1use serde::{Deserialize, Serialize};
4use std::collections::HashMap;
5
6#[derive(Debug, Clone, Serialize, Deserialize)]
8pub struct MLMonitoringConfig {
9 pub enable_real_time_monitoring: bool,
11 pub performance_tracking: bool,
13 pub drift_detection: DriftDetectionConfig,
15 pub anomaly_detection: bool,
17 pub alert_thresholds: HashMap<String, f64>,
19}
20
21#[derive(Debug, Clone, Serialize, Deserialize)]
23pub struct DriftDetectionConfig {
24 pub enable_detection: bool,
26 pub detection_methods: Vec<DriftDetectionMethod>,
28 pub window_size: usize,
30 pub significance_threshold: f64,
32}
33
34#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
36pub enum DriftDetectionMethod {
37 ADWIN,
38 DDM,
39 EDDM,
40 PageHinkley,
41 KolmogorovSmirnov,
42 PopulationStabilityIndex,
43}