Expand description
PELT (Pruned Exact Linear Time) offline change point detection.
Detects structural breaks in embedding trajectories by finding timestamps where the mean vector shifts significantly.
ยงAlgorithm
- Define cost function as sum of squared deviations from segment mean.
- Dynamic programming with pruning: maintain set of candidate change points.
- Penalty controls sensitivity (BIC default:
dim * ln(n) / 2).
Complexity: O(N) amortized per Killick et al. (2012).
Structsยง
- Cumulative
Sums ๐ - Cumulative sums for O(1) segment cost computation.
- Pelt
Config - PELT configuration.
Functionsยง
- build_
cumsum ๐ - compute_
segment_ ๐means - Compute mean vectors before and after a change point.
- detect
- Run PELT change point detection on a trajectory.
- segment_
cost ๐ - Cost of segment [start, end): sum of squared deviations from segment mean.
- segment_
mean ๐