-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Showing
5 changed files
with
986 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.