Training the multiclass logistic regression model
Now that we've clearly understood the structure of the data and we've segmented it into multiple tables to support the different stages of the ML model life cycle, let's focus on the training of our multiclass logistic regression model. We'll execute the SQL queries to create our multiclass logistic regression models:
- Let's start creating the first version of our ML model:
CREATE OR REPLACE MODEL `06_nyc_trees.classification_model_version_1` OPTIONS ( model_type='LOGISTIC_REG', auto_class_weights=TRUE ) AS SELECT zip_city, tree_dbh, spc_latin as label FROM `06_nyc_trees.training_table` ;
The query used to create the
classification_model_version_1
model is based only on two features: the zip area and the diameter of the tree.The SQL statement starts with the keywords
CREATE OR REPLACE MODEL
, which...