Google Cloud Professional Machine Learning Engineer — Question 335
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?
Answer options
- A. Use a linear regression model. Perform one-hot encoding on categorical features, and create additional features based on the date, such as day of the week or month.
- B. Use a boosted tree model. Perform label encoding on categorical features, and transform the date column into numeric values.
- C. Use an autoencoder model. Perform label encoding on categorical features, and normalize the date column.
- D. Use a matrix factorization model. Perform one-hot encoding on categorical features, and create interaction features between the store location and product category variables.
Correct answer: A
Explanation
The correct answer is A because a linear regression model is suitable for predicting continuous outcomes like sales, and one-hot encoding for categorical features along with creating date-based features enhances the model's ability to capture trends. Options B and C are less effective as they do not employ the best model or appropriate feature transformations, while D introduces unnecessary complexity without a clear advantage for this context.