Module change_point

Module change_point 

Source
Expand description

Change point detection using the PELT (Pruned Exact Linear Time) algorithm.

This module provides functionality to detect regime shifts in time series data, helping identify when performance characteristics changed significantly.

§Algorithm Details

PELT uses a penalty parameter to control sensitivity to change points. The algorithm minimizes: cost + penalty * number_of_change_points, where cost measures how well segments fit the data.

§Tuning the Penalty Parameter

  • Lower penalty (e.g., 0.5): More sensitive, detects multiple change points
  • Higher penalty (e.g., 3.0+): Conservative, only detects major changes
  • Default: 0.5 - balanced for detecting multiple significant changes

Configure via .gitperfconfig:

[change_point]
penalty = 0.5  # Global default

[change_point."specific_measurement"]
penalty = 1.0  # Per-measurement override

The scaled penalty used internally is: penalty * log(n) * variance This adapts to data size and variability automatically.

Structs§

ChangePoint
A detected change point in the time series
ChangePointConfig
Configuration for change point detection
EpochTransition
Represents an epoch boundary transition

Enums§

ChangeDirection
Direction of a detected change

Functions§

detect_change_points
Detect change points in a time series using the PELT algorithm.
detect_epoch_transitions
Detect epoch transitions in a sequence of measurements.
enrich_change_points
Convert raw change point indices to enriched ChangePoint structures.