stats/rolling_correlation_utils library

Rolling (sliding-window) Pearson correlation (roadmap #577).

Computes the Pearson correlation between two series within each window of a fixed size as it slides one step at a time, revealing how the strength of the relationship changes over the course of the data.

Functions

rollingCorrelation(List<num> x, List<num> y, int window) List<double>
Pearson correlation of x and y over each sliding window of window.