Training the linear regression model
Training a BigQuery ML model is not a one-shot operation, but it's a process that can require multiple attempts and recycles to get closer to the final goal of developing an effective asset with good performance, according to the requirements of the business scenario. For our use case, we'll go try to improve the performance of our ML model multiple times. Let's get started:
- First, let's start training a new machine learning model named
trip_duration_by_stations
:CREATE OR REPLACE MODEL `04_nyc_bike_sharing.trip_duration_by_stations` OPTIONS (model_type='linear_reg') AS SELECT start_station_name, end_station_name, tripduration as label FROM `04_nyc_bike_sharing.training_table`;
In this statement, we can notice the
CREATE OR REPLACE MODEL
keyword, which is used to create a new model. This keyword is followed by the identifier of the model, which is represented...