Evaluating the binary logistic regression model
To evaluate our BigQuery ML model, we'll use the ML.EVALUATE
function and the table that we've expressly created as the evaluation dataset.
The following query will tell us whether the model is suffering from overfitting or is also able to perform well on new data:
SELECT Â Â roc_auc, Â Â CASE Â Â Â Â WHEN roc_auc > .9 THEN 'EXCELLENT' Â Â Â Â WHEN roc_auc > .8 THEN 'VERY GOOD' Â Â Â Â WHEN roc_auc > .7 THEN 'GOOD' Â Â Â Â WHEN roc_auc > .6 THEN 'FINE' Â Â Â Â WHEN roc_auc > .5 THEN 'NEEDS IMPROVEMENTS' Â Â ELSE Â Â 'POOR' END Â Â AS model_quality FROM Â Â ML.EVALUATE(MODEL `05_chicago_taxi.binary_classification_version_5`, Â Â Â Â ( Â Â Â Â SELECT Â Â Â Â Â Â Â ...