Pattern Mining
The MiningEngine runs PrefixSpan sequence mining every 15 minutes (configurable) on segmented operator sessions, discovering three pattern types.
PrefixSpan Configuration
| Parameter | Default | Description |
|---|---|---|
| min_support | 5 | Minimum session count for a pattern to qualify |
| max_pattern_length | 8 | Maximum actions in a sequence pattern |
| max_gap_ms | 120,000 | Max gap between consecutive actions (2 min) |
| interval_ms | 900,000 | Mining run interval (15 min) |
Pattern Types
Sequence
Repeated ordered action subsequences. Depth-first projection (no candidate generation).
items: Vec<SequenceItem>, support: u32, avg_duration_ms: i64
Reaction
Telemetry threshold crossing triggers an operator action.
trigger_field, trigger_op (Gt/Lt/Gte/Lte), trigger_value, response_action, avg_response_time_ms, occurrences
Cascade
Cross-entity workflow: action on entity A triggers action on entity B after a delay.
steps: Vec<CascadeStep> (action_label, target, typical_delay_ms), occurrences
Session Type
Rust
// A session is a sequence of (action_label, timestamp_ms) pairs
type Session = Vec<(String, i64)>;
// SessionSegmenter groups by principal with 5-min gap
let (session_id, is_new) = segmenter.assign("operator", timestamp_ms); Questions?
Reach out for help with integration, deployment, or custom domain codecs.