PowerGrid Inc trains a model to forecast hourly electricity load over multiple years stored in an S3 data lake and uses SageMaker Processing jobs for feature engineering. The team considered using a standard k-fold (scikit-learn KFold with shuffle=False) cross-validation during hyperparameter tuning on SageMaker, but worries about temporal leakage. Which validation strategy and SageMaker integration is the best practice to avoid leakage while supporting robust hyperparameter tuning?
Choose an answer
Tap an option to check your answer.
Correct answer: Implement walk-forward (rolling-origin) validation implemented as multiple SageMaker Training jobs (one per fold) or a SageMaker Processing-based orchestration, ensuring each fold only trains on past data and validates on future windows..
Why this is the answer
Walk-forward (rolling-origin) validation is the best practice for time-series data because it mimics real-world scenarios by training on past data and evaluating on future, unseen data, thus preventing temporal leakage. SageMaker Training jobs or SageMaker Processing can orchestrate this by creating sequential folds. Standard k-fold CV with shuffle=False is not equivalent to time-series CV; it still splits the data into contiguous blocks, but these blocks might not maintain the strict past-to-future relationship needed to prevent leakage. Leave-one-out CV is computationally expensive and not suitable for time series due to its focus on individual data points rather than temporal sequences. A single hold-out validation split is less robust than cross-validation for hyperparameter tuning as it provides only one evaluation of the model's performance.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed