src.dackar.RCA.orchestrators.temporal_relations¶
Attributes¶
Classes¶
A closed time interval [start, end]. For point events set end == start. |
Functions¶
|
Classify the temporal relation of interval A relative to reference interval B. |
|
Signed lag in hours from A onset to B onset (b.start − a.start). |
Module Contents¶
- class src.dackar.RCA.orchestrators.temporal_relations.Interval[source]¶
A closed time interval [start, end]. For point events set end == start.
- src.dackar.RCA.orchestrators.temporal_relations.allen_relation(a, b, epsilon_hours=0.5, interval_type='closed')[source]¶
Classify the temporal relation of interval A relative to reference interval B.
Returns
(relation_name, base_rca_relevance_score).bis the event interval;ais an anomaly or maintenance window.epsilon_hoursabsorbs timestamp noise and near-simultaneous boundary cases — boundaries within epsilon are treated as touching.interval_typecontrols whether anomaly endpoints are interpreted as closed/open when evaluating boundary-touching cases.Decision logic (evaluated in order):
FOLLOWS — a starts meaningfully after b ends
PRECEDES — a ends meaningfully before b starts
CONTAINS — a started before b AND ends after b (encompasses event)
OVERLAPS — a started before b, ends within b (degradation active at onset)
- DURING — everything else: a started at or after b onset, including
“started inside b and ended after b” (consequential anomaly)