Function discover_discords

Source
pub fn discover_discords(
    trajectory: &[(i64, &[f32])],
    window: usize,
    max_discords: usize,
) -> Result<Vec<Discord>, AnalyticsError>
Expand description

Discover the top-k anomalous subsequences (discords).

A discord is the subsequence with the largest Matrix Profile value (i.e., it is most unlike any other subsequence).

§Arguments

  • trajectory — Time-ordered (timestamp, vector) pairs
  • window — Subsequence length
  • max_discords — Maximum number of discords to return

§Errors

Returns AnalyticsError::InsufficientData if trajectory too short.