feat(stats): add Savitzky-Golay smoothing filter #1986
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.40) × (1 − Review Confidence (0.45)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 142 lines diff across 1 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.297
Real PR Conversation Timeline
1 comments
"Review active on #1986"
general
weight: 0.35
Shizoqua
Adds
stats.SavitzkyGolay, a rolling Savitzky-Golay smoothing filter as requested in #1424.Savitzky-Golay fits a polynomial of a given degree to a sliding window of observations by least squares and returns the smoothed value of the most recent point via the precomputed
scipy.signal.savgol_coeffsdot product. Because the polynomial is evaluated at the last point of the window, the filter is causal and compatible with online learning.__init__, applied over a fixed-sizedequeget()returnsNoneuntil the window has enough observationswindow_size/polyorderfollow scipy's constraint (polyorder < window_size, enforced by scipy)stats/__init__.pyand the docs navVerification:
pytest tests/stats— 175 passed (incl. doctests)ruff check/ruff format --checkcleanDCO sign-off included.