Training the time series forecasting model
In this section, we'll train the BigQuery ML time series forecasting model.
Let's start training the machine learning model liquor_forecasting
, executing the following SQL statement:
CREATE OR REPLACE MODEL `08_sales_forecasting.liquor_forecasting` OPTIONS (model_type = 'ARIMA', Â Â time_series_timestamp_col = 'date', Â Â time_series_data_col = 'total_sold_liters', Â Â auto_arima = TRUE, Â Â data_frequency = 'AUTO_FREQUENCY' ) AS SELECT * FROM `08_sales_forecasting.iowa_liquor_sales`;
The SQL statement is composed of the following parts:
- The first lines of the query start with the keywords
CREATE OR REPLACE MODEL
, followed by the identifier of the machine learning model,`08_sales_forecasting.liquor_forecasting`
, and byOPTIONS
. - Now let's focus on the options that we've used to train our machine learning model. The selected...