Research question

If a forecasting model fits the training set well, does it predict the future? Usually not. This article discusses three tests: whether out-of-sample error beats a baseline, whether the model overfits, and whether comparisons are corrected for multiple testing[1].

Data

Time-series or panel data, forecast target, feature set, train/validation/test split, rolling-window length and missing-value treatment. Time series must not be randomly shuffled, or future information leaks into training; cross-sectional data must also prevent the same entity crossing splits[2].

Method

Forecast error is often measured by RMSE:

$$ RMSE = \sqrt{\frac{1}{n}\sum (y_i - \hat{y}_i)^2} $$

A baseline can be the naive forecast (last value, mean or random walk). A complex model is valuable only if out-of-sample RMSE is consistently below the baseline. Training fits, validation tunes, test reports; the three must not be mixed[3][4].

Results

Suppose baseline RMSE is 10, the complex model has training RMSE 6 and test RMSE 12. Training looks better but out-of-sample is worse, indicating overfitting. If test RMSE is 8, the improvement is 20% versus baseline, but check stability across windows and multiple-testing correction.

Robustness

Change rolling windows, forecast horizons, feature sets and random seeds; check whether the RMSE ranking is stable. A model that wins only in one window may be data mining. Report mean, distribution and worst window, not only average improvement.

Limitations

First, data leakage; second, too-short out-of-sample; third, structural change; fourth, multiple comparisons; fifth, too-weak baseline; sixth, metric not aligned with the decision. Under these conditions, rankings can distort.

Reproduction

Fix data splits and random seeds; report baseline, validation and test RMSE; provide feature lists and tuning ranges; check leakage and multiple comparisons; report worst windows and confidence intervals. The goal is to let readers judge whether the model truly beats the baseline.

图表

From baseline to out-of-sample forecast Baseline 10 10, Train 6 6, Test 12 12. With baseline 10, train 6 and test 12, the model is worse out of sample. Units: error units; numbers are teaching assumptions. Teaching mechanism figure. RMSE=√(Σ(y-ŷ)²/n) Baseline 10 10 naive mean Train 6 6 fit tune Test 12 12 out-of-sample overfit A good training fit does not mean useful forecasts With baseline 10, train 6 and test 12, the model is worse out of sample. Units: error units; numbers are teaching assumptions.
Figure 1:Baseline 10 10, Train 6 6, Test 12 12. With baseline 10, train 6 and test 12, the model is worse out of sample. Units: error units; numbers are teaching assumptions. Teaching mechanism figure.
Out-of-sample RMSE example Out-of-sample RMSE example. Simple baseline: Train 10, Test 10, Verdict 稳定; Complex model: Train 6, Test 8, Verdict 改善 20%. Only when test RMSE is consistently below baseline is complexity valuable; otherwise it is cost. Units: error units and percent; numbers are teaching assumptions. Numbers are teaching assumptions. 基线 10;模型 8;改善 20% Simple baseline Train 10 Test 10 Verdict 稳定 Complex model Train 6 Test 8 Verdict 改善 20% Only when test RMSE is consistently below baseline is complexity valuable; otherwise it is cost. Units: error units and percent; numbers are teaching assumptions.
Figure 2:Out-of-sample RMSE example. Simple baseline: Train 10, Test 10, Verdict 稳定; Complex model: Train 6, Test 8, Verdict 改善 20%. Only when test RMSE is consistently below baseline is complexity valuable; otherwise it is cost. Units: error units and percent; numbers are teaching assumptions. Numbers are teaching assumptions.
Training versus test evaluation Training versus test evaluation. Training: Use 拟合, Bias 乐观, Conclusion 不可报告; Test: Use 最终评价, Bias 较小, Conclusion 可报告. Training learns, test judges; mixing overstates the model. Units: qualitative comparison; numbers are teaching assumptions. Teaching comparison figure. Training Use 拟合 Bias 乐观 Conclusion 不可报告 Test Use 最终评价 Bias 较小 Conclusion 可报告 Training learns, test judges; mixing overstates the model. Units: qualitative comparison; numbers are teaching assumptions.
Figure 3:Training versus test evaluation. Training: Use 拟合, Bias 乐观, Conclusion 不可报告; Test: Use 最终评价, Bias 较小, Conclusion 可报告. Training learns, test judges; mixing overstates the model. Units: qualitative comparison; numbers are teaching assumptions. Teaching comparison figure.
6 conditions for a useful forecasting model 6 conditions for a useful forecasting model. No leakage; Reasonable baseline; Enough out-of-sample; Metric matches; Multiple testing; Stable structure. If one of the 6 conditions fails, model rankings may distort; usability depends on these conditions. Units: condition checklist; numbers are teaching assumptions. These conditions decide whether the method applies. Check splits, baseline, leakage and stability No leakage time order Reasonable baseline naive forecast Enough out-of-sample multiple windows Metric matches decision goal Multiple testing data mining Stable structure institutions/tech If one of the 6 conditions fails, model rankings may distort; usability depends on these conditions. Units: condition checklist; numbers are teaching assumptions.
Figure 4:6 conditions for a useful forecasting model. No leakage; Reasonable baseline; Enough out-of-sample; Metric matches; Multiple testing; Stable structure. If one of the 6 conditions fails, model rankings may distort; usability depends on these conditions. Units: condition checklist; numbers are teaching assumptions. These conditions decide whether the method applies.

Related

  • 与 RES-026 Forecasting and Machine Learning 的关系:The parent article gives the module's overall frame; this article isolates “how out-of-sample error, baselines and overfitting determine model value” and turns it into a worked example and explicit conditions.
  • 与 RES-031 Regression and Econometrics: Coefficients, Standard Errors and Causality 的关系:An adjacent topic in the same station provides background or contrast; this article does not repeat its focus and concentrates on “how out-of-sample error, baselines and overfitting determine model value”.
  • 与 RES-033 Alternative Data and Complex Systems: Signal, Noise and Networks 的关系:An adjacent topic in the same station provides background or contrast; this article does not repeat its focus and concentrates on “how out-of-sample error, baselines and overfitting determine model value”.

Exercises

  1. RMSE question: baseline 10, model test 8. What is the improvement? What if test is 12?
  2. Overfitting question: training RMSE 6, test 12, baseline 10. Is the model worth using, and why?
  3. Conditions question: list three failure conditions for forecasting models and explain how each affects out-of-sample performance.

Sources

  1. Barbara Illowsky; Susan Dean, Introductory Statistics 2e, 12.5 Prediction, OpenStax. https://openstax.org/books/introductory-statistics-2e/pages/12-5-prediction
  2. Davide Chicco; Giuseppe Jurman, The ABC recommendations for validation of supervised machine learning results in biomedical sciences, Frontiers in Big Data, 5, 979465. https://www.frontiersin.org/journals/big-data/articles/10.3389/fdata.2022.979465/full
  3. Rob J. Hyndman and George Athanasopoulos, Forecasting: Principles and Practice, 3rd edition, OTexts, 2021. https://otexts.com/fpp3/
  4. scikit-learn developers, Common pitfalls and recommended practices, scikit-learn documentation. https://scikit-learn.org/stable/common_pitfalls.html

Worked demo

Read-through check: can you say three things?

No recitation needed. Tick each sentence below and see whether you can explain the mechanism, one worked example and one boundary in your own words.

Ticked 0 / 3

The numbers are teaching assumptions that show relationships, not forecasts or investment advice.

This article has passed the current publication gate. Factual, calculation and translation revisions update both language versions together.

Back to station