Evaluating the linear regression model
For the evaluation stage of our BigQuery ML model, we'll use the ML.EVALUATE
function and the table that we've expressly created to host the evaluation records. These are completely separate from the rows that are used during the training phase.
Let's execute the following query to evaluate our ML model on the evaluation table:
SELECT Â Â * FROM Â Â ML.EVALUATE(MODEL `04_nyc_bike_sharing.trip_duration_by_stations_and_day`, Â Â Â Â ( Â Â Â Â SELECT Â Â Â Â Â Â Â Â Â Â start_station_name, Â Â Â Â Â Â Â Â Â Â end_station_name, Â Â Â Â Â Â Â Â Â Â IF (EXTRACT(DAYOFWEEK FROM starttime)=1 OR Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â EXTRACT(DAYOFWEEK FROM starttime)=7, Â Â Â Â Â Â Â ...