DEV Community

Cover image for GCP-BigQueryML ForecastingModel
Vignesh C
Vignesh C

Posted on • Updated on

GCP-BigQueryML ForecastingModel

• Use BigQuery to find public datasets

• Query and explore the public taxi cab dataset

• Create a training and evaluation dataset to be used for batch prediction

• Create a forecasting (linear regression) model in BigQuery ML

• Evaluate the performance of your machine learning model.

Alt Text

More Details:

GitHub logo IamVigneshC / GCP-BigQueryML-ForecastingModel

Use BigQuery to find public datasets. Query and explore the public taxi cab dataset. Create a training and evaluation dataset to be used for batch prediction. Create a forecasting (linear regression) model in BigQuery ML. Evaluate the performance of your machine learning model.

GCP-BigQueryML-ForecastingModel

• Use BigQuery to find public datasets

• Query and explore the public taxi cab dataset

• Create a training and evaluation dataset to be used for batch prediction

• Create a forecasting (linear regression) model in BigQuery ML

• Evaluate the performance of your machine learning model.

Explore NYC taxi cab data

How many trips did Yellow Cab taxis take each month in 2015?

#standardSQL SELECT TIMESTAMP_TRUNC(pickup_datetime MONTH) month COUNT(*) trips FROM bigquery-public-data.new_york.tlc_yellow_trips_2015 GROUP BY 1 ORDER BY 1 Then click Run.

You should receive the following result:

Image of CloudBuild

As we see, every month in 2015 had over 10 million NYC taxi trips—no small amount!

Replace the previous query with AvgSpeed.sql

You should receive the following result:

Image of CloudBuild

During the day, the average speed is around 11-12 MPH; but at 5:00 AM the average speed almost doubles to 21 MPH. Intuitively this makes sense since there is likely less traffic…







PS: Sorry, couldn't repost here since there are some incompatible MD codes. Thank you!

Top comments (0)