Title: 544
Tags: lec39

Q: In BigQuery, what are two reasons to do train/test splitting yourself (for ML) instead of letting BigQuery do it?
A: 1. BigQuery has odd defaults depending on dataset size.  For example, for <500 rows, all data is used for training.
2. BigQuery remembers the train/test split for 48 hours, so it will feel deterministic at first, but you'll be surprised later

Q: In BigQuery, what must be passed to ML.WEIGHTS(...)?
A: MODEL your_model_name

Q: In BigQuery, what must be passed to ML.PREDICT(...)?
A: MODEL your_model_name, QUERY
The query must have all the features needed to predict.

Q: In BigQuery, what must be passed to ML.EVALUATE(...)?
A: MODEL your_model_name, QUERY
The query must return all the features needed to predict AND a label column indicating the correct label.

Q: In BigQuery, how do we do non-linear transformations on our features?
A: When creating the model, add a line something like this:
TRANSFORM(POWER(x, 2), ...)
In the parentheses, you can put things you would normally put after select: "SELECT ?????".  This lets you add columns that are transformations of raw columns in the input data.

Q: In BigQuery, how do you handle OneHot encoding?
A: Do nothing: BigQuery will automatically do it for you if your training data has categorical features.