问题
Pity Google BigQuery still doesn't have a function such as forecast()
that we see in Spreadsheets-- don't look down on yet; given one has the statistical know-how, surprising amount of smoothing and seasonality can be added to forecasting on spreadsheets.
BigQuery allows you to determine Standard Deviation, correlation and intercept metrics. Using that, one can create the prediction model-- refer to this and this. But that uses Linear regression model; so we are not happy with the seasonality aspect. Question is, how can we construct Multiple regression model for prediction in BigQuery?
If Y = a1x1+a2x2+a3x3+c
, do we (1) separately determine a1, a2 and a3 and finally join the queries? But what about the intercept? How do we calculate one for MR in Bigquery?
Any contribution will be greatly appreciated...
来源:https://stackoverflow.com/questions/51798133/forecasting-using-multiple-regression-in-bigquery