转折定位
原能力
比较不同观察窗口下的转折位置,将短时波动与持续变化作为不同假设登记。(细化版 p.4–5)
首选项目
ruptures(BSD-2-Clause)。 ruptures
匹配范围
Pelt 对时间序列变化点做候选定位。
源码
ruptures · def predict(
src/ruptures/detection/pelt.py · 117–130 行。 在 GitHub 查看源码 · 许可证与声明
源码片段
def predict(self, pen: float) -> list[int]:
"""Return the optimal breakpoints.
Must be called after the fit method. The breakpoints are associated with the signal passed
to [`fit()`][ruptures.detection.pelt.Pelt.fit].
Args:
pen (float): penalty value (>0)
Raises:
BadSegmentationParameters: in case of impossible segmentation
configuration
Returns:
接口用法示意
rpt.Pelt(model='l2').fit(series).predict(pen=approved_penalty)
实现与验收要点
多窗口稳定性、代价函数选择、离线检测和误报复核。