Your marketing team's event table has NULL values in the revenue (FLOAT64) and channel (STRING) columns. When building a regression model with BigQuery ML, you want to automatically replace missing revenue with the column's median and missing channel with the most frequent non-null value, without creating an intermediate table. Which preprocessing function should you reference in the TRANSFORM clause to satisfy both requirements?
Use ML.MAX_ABS_SCALER() in the TRANSFORM clause to rescale features; it automatically replaces NULLs with zero.
Use ML.NORMALIZER() in the TRANSFORM clause; its unit-norm scaling also removes NULLs from the data.
Use ML.IMPUTER() and set numeric_strategy='MEDIAN' and categorical_strategy='MOST_FREQUENT' in the TRANSFORM clause.
Use ML.ONE_HOT_ENCODER() with a null_value parameter in the TRANSFORM clause to encode and impute both columns.
ML.IMPUTER is the BigQuery ML preprocessing function designed to handle missing data. When used in a TRANSFORM clause, it can simultaneously impute numeric columns with a MEDIAN (or MEAN) strategy and categorical columns with a MOST_FREQUENT (or CONSTANT) strategy, eliminating the need for a staging table. Scaling, normalization, and encoding functions-such as ML.MAX_ABS_SCALER, ML.NORMALIZER, or ML.ONE_HOT_ENCODER-do not fill in missing values; they assume the data is already complete, so they would leave NULLs untouched and fail to meet the requirement.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is ML.IMPUTER in BigQuery ML?
Open an interactive chat with Bash
How does the 'numeric_strategy' and 'categorical_strategy' work with ML.IMPUTER?
Open an interactive chat with Bash
Why wouldn't ML.MAX_ABS_SCALER or ML.NORMALIZER work for imputation?
Open an interactive chat with Bash
What is ML.IMPUTER in BigQuery ML?
Open an interactive chat with Bash
How does numeric_strategy='MEDIAN' and categorical_strategy='MOST_FREQUENT' work in ML.IMPUTER?
Open an interactive chat with Bash
What are the key differences between ML.IMPUTER and other BigQuery ML preprocessing functions like ML.MAX_ABS_SCALER or ML.NORMALIZER?
Open an interactive chat with Bash
GCP Professional Data Engineer
Preparing and using data for analysis
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99 $11.99
$11.99/mo
Billed monthly, Cancel any time.
$19.99 after promotion ends
3 Month Pass
$44.99 $26.99
$8.99/mo
One time purchase of $26.99, Does not auto-renew.
$44.99 after promotion ends
Save $18!
MOST POPULAR
Annual Pass
$119.99 $71.99
$5.99/mo
One time purchase of $71.99, Does not auto-renew.
$119.99 after promotion ends
Save $48!
BEST DEAL
Lifetime Pass
$189.99 $113.99
One time purchase, Good for life.
Save $76!
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .