Machine Learning with BigQuery ML by Alessandro Marrandino
Author:Alessandro Marrandino
Language: eng
Format: epub
Publisher: Packt Publishing Pvt. Ltd.
Published: 2021-05-14T00:00:00+00:00
Using the multiclass logistic regression model
In this section, we'll test our ML model and analyze the results.
To use our BigQuery ML model, we'll use the ML.PREDICT function and the classification_table table, which hosts the records, to test our model, as seen in the following code block:
SELECT
tree_id,
actual_label,
predicted_label_probs,
predicted_label
FROM
ML.PREDICT (MODEL `06_nyc_trees.classification_model_version_3`,
(
SELECT
tree_id,
zip_city,
tree_dbh,
boroname,
nta_name,
health,
sidewalk,
spc_latin as actual_label
FROM
`06_nyc_trees.classification_table`
));
The query statement is composed of the SELECT keyword, which extracts the tree_id, the actual value of the species in the field, actual_label, and the predicted fields predicted_label_probs and predicted_label.
The ML.PREDICT function is applied to the SELECT statement, which extracts the features and the actual species from the classification_table. The actual_label field will be used only as a benchmark for our predictions and not during the prediction phase.
In the following screenshot, we can see the structure of a record gotten from the execution of the previous query:
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Exploring Deepfakes by Bryan Lyon and Matt Tora(7730)
Robo-Advisor with Python by Aki Ranin(7626)
Offensive Shellcode from Scratch by Rishalin Pillay(6106)
Microsoft 365 and SharePoint Online Cookbook by Gaurav Mahajan Sudeep Ghatak Nate Chamberlain Scott Brewster(5025)
Ego Is the Enemy by Ryan Holiday(4958)
Management Strategies for the Cloud Revolution: How Cloud Computing Is Transforming Business and Why You Can't Afford to Be Left Behind by Charles Babcock(4438)
Python for ArcGIS Pro by Silas Toms Bill Parker(4184)
Elevating React Web Development with Gatsby by Samuel Larsen-Disney(3890)
Machine Learning at Scale with H2O by Gregory Keys | David Whiting(3627)
Learning C# by Developing Games with Unity 2021 by Harrison Ferrone(3285)
Speed Up Your Python with Rust by Maxwell Flitton(3231)
Liar's Poker by Michael Lewis(3225)
OPNsense Beginner to Professional by Julio Cesar Bueno de Camargo(3195)
Extreme DAX by Michiel Rozema & Henk Vlootman(3172)
Agile Security Operations by Hinne Hettema(3124)
Linux Command Line and Shell Scripting Techniques by Vedran Dakic and Jasmin Redzepagic(3109)
Essential Cryptography for JavaScript Developers by Alessandro Segala(3083)
Cryptography Algorithms by Massimo Bertaccini(3001)
AI-Powered Commerce by Andy Pandharikar & Frederik Bussler(2983)
