A data scientist building a BigQuery ML regression must rescale a numeric feature to the 0 to 1 range, and the same scaling must be applied automatically whenever the model scores new rows. Which approach achieves this?
Show answer and explanation
Answer: D
Declaring preprocessing in the TRANSFORM clause of CREATE MODEL, with MIN_MAX_SCALER for a 0 to 1 range or STANDARD_SCALER for standardization, stores the learned statistics with the model. Prediction then applies the same transformation automatically, which avoids training-serving mismatch. Hand calculations can work, but the scoring query must replicate the exact constants, which is error prone.
Why the other options are wrong
- A. Many algorithms are sensitive to feature magnitude, and skipping scaling can slow convergence or distort regularization. The claim that every algorithm ignores range is false.
- B. Random multipliers do not map values to a meaningful 0 to 1 range and destroy the relationship between features and target. The result is noise rather than a usable feature.
- C. Manual min and max calculation can produce the right numbers, but the constants live outside the model. Scoring code can drift from them, which is why the built-in transform is preferred.