nerdexam
Google

PROFESSIONAL-MACHINE-LEARNING-ENGINEER · Question #7

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

The correct answer is B. Split the training and test data based on time rather than a random split to avoid leakage.. If you do time series prediction, you can't borrow information from the future to predict the future. If you do, you are artificially increasing your accuracy.

Submitted by devops_kid· Apr 18, 2026Data processing and feature engineering

Question

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?

Options

  • ANormalize the data for the training, and test datasets as two separate steps.
  • BSplit the training and test data based on time rather than a random split to avoid leakage.
  • CAdd more data to your test set to ensure that you have a fair distribution and sample for testing.
  • DApply data transformations before splitting, and cross-validate to make sure that the

How the community answered

(65 responses)
  • A
    8% (5)
  • B
    75% (49)
  • C
    14% (9)
  • D
    3% (2)

Explanation

If you do time series prediction, you can't borrow information from the future to predict the future. If you do, you are artificially increasing your accuracy.

Topics

#Data Leakage#Time-Series Data#Train-Test Split#Model Evaluation Pitfalls

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-MACHINE-LEARNING-ENGINEER Practice