Which BigQuery ML Algorithm and Preprocessing Best Predicts Retail Sales?
You work at a retail company, and are tasked with developing an ML model to predict product sales. Your company’s historical sales data is stored in BigQuery and includes features such as date, store location, product category, and promotion details. You need to choose the most effective combination of a BigQuery ML model and feature engineering to maximize prediction accuracy. What should you do?
Community Votes
50% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
Tests model selection for tabular prediction tasks, with the common trap being favoring computationally efficient linear models over boosted trees that deliver superior accuracy on complex sales data.
This question evaluates selecting the optimal BigQuery ML algorithm and preprocessing pipeline for tabular sales forecasting. While the community split evenly between linear regression and boosted trees, official guidance prioritizes gradient-boosted decision trees for capturing non-linear retail patterns.
Option A (Linear Regression) was selected by half the voters because its straightforward date feature engineering appears more intuitive, but it lacks the capacity to model non-linear promotional effects and seasonal demand spikes accurately.
Community Discussion (3 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
Boosted tree models excel at tabular data with mixed feature types and non-linear relationships, making them ideal for sales forecasting. Label encoding efficiently handles categorical features without exploding dimensionality, while converting dates to numeric formats allows tree splits to learn temporal trends effectively. BigQuery ML’s BOOSTED_TREE implementation automatically handles missing values and scales well for production-grade predictions.Why the Other Options Are Wrong
Linear regression assumes linear relationships and struggles with complex promotional effects and seasonal spikes common in retail datasets. Autoencoders are unsupervised generative models used for anomaly detection or dimensionality reduction, not supervised sales forecasting. Matrix factorization is designed for collaborative filtering in recommendation engines, not structured tabular sales prediction, and interaction features alone cannot compensate for the mismatched algorithm.Community Comment Notes
The voting split highlights a classic exam dilemma between efficiency and accuracy. Comment [2] correctly notes linear regression’s efficiency but overlooks that exam scenarios prioritize predictive performance for business-critical tasks like revenue forecasting. Comment [3] questions date transformation in boosted trees, yet numeric conversion remains standard practice for temporal feature ingestion in tree-based algorithms. Overall, the community debate underscores the importance of aligning model choice with the primary objective: maximizing accuracy.Official Reference
Exam Strategy
Always match the algorithm to the primary goal: choose boosted trees or random forests for tabular accuracy, and reserve linear models only when interpretability or training speed is explicitly prioritized. When feature engineering options are paired with models, verify that the preprocessing step aligns with how the algorithm internally processes inputs rather than defaulting to familiar techniques.
Related Analysis
Practice All PMLE Questions
Access 65 questions with complete answers and detailed explanations.
View Full PMLE Practice Test →