4 comments

  • rzzzwilson 5 hours ago ago

    Interesting. A "zero code" implementation?

    • Pierdimi 3 hours ago ago

      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 5 hours ago ago

    [dead]