sightloom_analysis/
pattern.rs1#[cfg(feature = "alloc")]
4extern crate alloc;
5
6#[cfg(feature = "alloc")]
7use alloc::vec::Vec;
8
9use sightloom_core::{EventId, PatternId, SubjectId};
10
11#[derive(Clone, Copy, Debug, Eq, PartialEq)]
13pub enum PatternKind {
14 TimeOfDay,
16 DayOfWeek,
18 VisitPeriodicity,
20 DwellDistribution,
22 RouteSequence,
24 CoOccurrence,
26 EventBeforeEvent,
28 ExpectedAbsence,
30 GroupFormation,
32 Custom,
34}
35
36#[derive(Clone, Debug, PartialEq)]
38pub struct PatternRecord {
39 pub pattern_id: PatternId,
41 pub kind: PatternKind,
43 pub subject_id: Option<SubjectId>,
45 pub confidence: f32,
47 pub evidence_events: Vec<EventId>,
49 pub tag: u32,
51}