How to perform linear regression in BigQuery?

前端 未结 3 2030
北荒
北荒 2020-12-09 06:29

BigQuery has some statistical aggregation functions such as STDDEV(X) and CORR(X, Y), but it doesn\'t offer functions to directly perform linear regression.

How can

3条回答
  •  南笙
    南笙 (楼主)
    2020-12-09 06:58

    Good news! BigQuery now has native support for ML.

    To produce a linear regression CREATE MODEL, and then predict with SELECT FROM ML.PREDICT.

    Docs:

    • https://cloud.google.com/bigquery/docs/bigqueryml

    Fun example: When will Stack Overflow reply

提交回复
热议问题