18
18
from .data_types import RuleExecutionRunParameters , HistoricData
19
19
20
20
try :
21
- import rules .dqopspaid .anomaly_detection
21
+ import rules .dqopspaid .ai . anomaly_detection
22
22
except ModuleNotFoundError :
23
23
ai_module_present = False
24
24
else :
@@ -85,7 +85,7 @@ def test_significance(values: list[float], parameters: RuleExecutionRunParameter
85
85
def detect_upper_bound_anomaly (historic_data : HistoricData , median : float , tail : float ,
86
86
parameters : RuleExecutionRunParameters ):
87
87
if hasattr (parameters .parameters , 'use_ai' ) and parameters .parameters .use_ai and ai_module_present :
88
- return rules .dqopspaid .anomaly_detection .detect_upper_bound_anomaly (historic_data , median , tail , parameters )
88
+ return rules .dqopspaid .ai . anomaly_detection .detect_upper_bound_anomaly (historic_data , median , tail , parameters )
89
89
90
90
values = historic_data ['converted_values' ]
91
91
values_above_median = [value for value in values if value is not None and value >= median ]
@@ -107,7 +107,7 @@ def detect_upper_bound_anomaly(historic_data: HistoricData, median: float, tail:
107
107
def detect_lower_bound_anomaly (historic_data : HistoricData , median : float , tail : float ,
108
108
parameters : RuleExecutionRunParameters ):
109
109
if hasattr (parameters .parameters , 'use_ai' ) and parameters .parameters .use_ai and ai_module_present :
110
- return rules .dqopspaid .anomaly_detection .detect_lower_bound_anomaly (historic_data , median , tail , parameters )
110
+ return rules .dqopspaid .ai . anomaly_detection .detect_lower_bound_anomaly (historic_data , median , tail , parameters )
111
111
112
112
values = historic_data ['converted_values' ]
113
113
values_below_median = [value for value in values if value is not None and value <= median ]
0 commit comments