Using the binary logistic regression model
In this section, we'll use the ML model to predict the probability of getting a tip from our customers.
To test our BigQuery ML model, we'll use the ML.PREDICT
function on the classification_table
table:
SELECT predicted_will_get_tip, predicted_will_get_tip_probs, will_get_tip actual FROM Â Â ML.PREDICT(MODEL`05_chicago_taxi.binary_classification_version_5`, Â Â Â Â ( Â Â Â Â Â Â SELECT Â Â Â Â Â Â Â Â trip_seconds, Â Â Â Â Â Â Â Â fare, Â Â Â Â Â Â Â Â tolls, Â Â Â Â Â Â Â Â company, Â Â Â Â Â Â Â Â payment_type, Â Â Â Â Â Â Â Â pickup_location, Â Â Â Â Â Â Â Â dropoff_location, Â Â Â Â Â Â Â Â IF(tips>0,1,0) AS will_get_tip...