Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql/stats: add simple linear regression over float64s and quantiles
Statistics forecasting will initially use simple linear regression over time to predict all table statistics (only keeping predictions that fit the linear model well). Most table statistics are scalar float64s, for which we can use a textbook ordinary least squares (OLS) method with x as time and y as the table statistic. For histograms, we use a variant of OLS based on the 2010 paper "Ordinary Least Squares for Histogram Data Based on Wasserstein Distance" by Verde and Irpino. The paper outlines an OLS method when both x and y are histograms. In our case, x is a scalar, so we adjust the math slightly. Assists: #79872 Release note: None
- Loading branch information