HackerTrans
TopNewTrendsCommentsPastAskShowJobs

Pierdimi

no profile record

Submissions

Show HN: O(1) Recursive Moving Linear Regression

2 points·by Pierdimi·26 dni temu·5 comments

[untitled]

1 points·by Pierdimi·27 dni temu·0 comments

Recursive Moving Polynomial Regression – O(1) Constant Complexity

zenodo.org
2 points·by Pierdimi·3 miesiące temu·3 comments

comments

Pierdimi
·24 dni temu·discuss
[dead]
Pierdimi
·24 dni temu·discuss
The statement "There is no need to rescan the window, both the computational cost and the additional memory remain constant as k increases" is inaccurate. The correct statement is: "There is no need to rescan the window; the computational cost remains constant as k increases, while the additional memory requirement grows linearly due to the circular buffer needed to store the windowed samples".
Pierdimi
·26 dni temu·discuss
A runnable implementation used for the comparative analysis against the Savitzky-Golay filter on a sawtooth signal is provided in Appendix B of the deposited working paper "Recursive Moving Polynomial Regression: A Unified Constant‑Time Approach" (https://doi.org/10.5281/zenodo.20574595).
Pierdimi
·26 dni temu·discuss
[dead]
Pierdimi
·26 dni temu·discuss
Yes. The moving linear regression reduces to a fixed‑cost O(1) recurrence, in a way analogous to a recursive moving average. The internal state requires only the two previous estimates y1_hat(n−1) and y1_hat(n−2), the current sample y(n), the previous sample y(n−1), and a circular buffer of length k+1 to access the samples leaving the window, y(n−k) and y(n−k−1). There is no need to rescan the window, both the computational cost and the additional memory remain constant as k increases.
Pierdimi
·26 dni temu·discuss
[dead]
Pierdimi
·3 miesiące temu·discuss
Hi. The Zenodo link is public and accessible — over a hundred users have downloaded the file.If you still see a block, you can use the DOI version: https://doi.org/10.5281/zenodo.19038620
Pierdimi
·3 miesiące temu·discuss
We present a recursive formulation of the moving polynomial regression (RPM), valid for any degree m, with O(1) constant complexity per sample updates. For each fixed degree m, the same expression provides full flexibility in the choice of the window length k and of the evaluation point. Compared with polynomial FIR filters such as Savitzky–Golay, the proposed recursion maintains a fixed and extremely small number of operations, independent of k and of the evaluation point, while performing least squares estimation over sliding windows with asymptotically predictable and controllable numerical drift. The structure consists of an autoregressive part of order m+1 and a convolutional part of order 2(m+1). The same architecture extends to the estimation of the derivatives of the local model, preserving the IIR+FIR structure. This yields a family of filters for the signal value and for derivatives of arbitrary order, with precomputable deterministic coefficients and full operational flexibility.