Google Cloud Professional Machine Learning Engineer — Question 40

You are building a model to predict daily temperatures. You split the data randomly and then transformed the training and test datasets. Temperature data for model training is uploaded hourly. During testing, your model performed with 97% accuracy; however, after deploying to production, the model's accuracy dropped to 66%. How can you make your production model more accurate?

Answer options

Correct answer: B

Explanation

The correct answer is B, as splitting the data based on time helps prevent data leakage that can occur with random sampling, ensuring the model is evaluated on future data. Options A and D do not address the leakage issue, and while C suggests a method to improve testing, it does not solve the underlying problem of how the data was split, which is critical for accurate model performance.