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...