Using the XGBoost classification model
In this section, we'll use the ML model to classify the trees into five different species according to their characteristics.
To test our BigQuery ML model, we'll use a ML.PREDICT
function on the classification_table
table, as follows:
SELECT tree_id, actual_label, predicted_label_probs, predicted_label FROM ML.PREDICT (MODEL `10_nyc_trees_xgboost.xgboost_classification_model_version_3`, ( SELECT tree_id, zip_city, tree_dbh, boroname, nta_name, health, sidewalk, spc_latin as actual_label ...