The prediction horizon defines the evaluation
A forecast must state when it is issued, what it predicts and when the outcome becomes observable. A next-day staffing decision and a quarterly capital plan need different horizons and available inputs. Randomly shuffling a time series can allow future information into training and produce an unrealistic impression of future performance. Related customer or site records can also leak information across a split.
For chronological evaluation, train on earlier observations and evaluate on a later period that was not used to fit or choose the model. Rolling-origin evaluation repeats this idea across several historical decision dates: at each origin, use only the information then available. Match any necessary gap to outcome windows and operational delays. The evaluation design should imitate the actual deployment question.
Preprocessing, feature selection and tuning belong within the training process at each applicable split. A scaling factor, category encoding or imputation value computed from the full dataset can leak information even if the final regression excludes test labels. Repeatedly inspecting the test score and changing the model turns that test set into development data; reserve a credible final evaluation or report that limitation.
Reconstruct the error file rather than quoting one score
In an original four-period holdout, actual demand is [12, 18, 9, 21]. A baseline predicts [10, 17, 11, 20], while a complex candidate predicts [12, 23, 8, 17]. Define error as forecast minus actual, so negative error denotes underforecasting. Baseline errors are [-2,-1, 2,-1], giving mean error -0.5, mean absolute error 1.5 and mean squared error 2.5.
Candidate errors are [0, 5,-1,-4], giving mean error zero, mean absolute error 2.5 and mean squared error 10.5. Zero average signed error does not mean accurate forecasts: positive and negative errors cancel. On these absolute and squared losses, the simple baseline is better. Four cases provide arithmetic practice, not reliable evidence that one model is generally superior.
Squared error penalizes large errors more heavily than absolute error and uses squared units; root mean squared error returns to demand units. Percentage errors can behave poorly when actual demand is zero or near zero. Define the denominator, aggregation and treatment of missing periods, and inspect group-level performance when a total could hide uneven service.
A decision loss can rank models differently
Suppose each underforecast unit costs 100 in an isolated staffing-loss approximation and each overforecast unit costs 20. Baseline underforecast totals four and overforecast totals two, so loss is 440. The candidate underforecasts five and overforecasts five, so loss is 600. These are stipulated linear costs; real overtime, lost customers or indivisible staffing may require a different decision model.
In a separate comparison on the same actuals, forecast A=[10, 18, 9, 21] has MAE 0.5 but underforecasts two units, producing loss 200. Forecast B=[13, 19, 10, 22] has MAE 1.0 and overforecasts four units, producing loss 80. Lower MAE does not automatically imply better economic action under asymmetric loss.
A point forecast optimized for one statistical loss is not necessarily the desired staffing quantity. With fully specified demand uncertainty and linear underage/overage costs, a decision can target an appropriate demand quantile. But capacity, integer crews and service constraints can alter the mapping. State whether the model predicts demand, chooses capacity or does both, and evaluate the complete resulting policy.
Report uncertainty and monitor the relevant population
Prediction intervals describe uncertainty about future outcomes under a model; confidence intervals about a mean answer a different question. Check empirical interval coverage and width across relevant periods and groups, with enough observations to assess them. Wide intervals can be statistically honest yet insufficiently useful for a particular commitment.
Compare the candidate with an appropriate simple baseline and the current operating policy. Use paired errors on the same future cases, examine stability across origins and retain the costs of producing or maintaining the model. A higher average score can still fail a minimum service constraint or become impractical when key data arrive late.
Use the complete on-site forecasting and validation studios; publisher and official documentation links remain optional provenance. No particular package is required for the published laboratory; it reconstructs the original arrays using the standard library. Optional practice changes leakage, grouping and loss costs. A model should be promoted only with an explicit evaluation design, assumptions, limitations and monitoring plan, rather than a single attractive development score.
Worked example: Unbiased on average can still be inaccurate
The candidate’s errors sum to zero but absolute errors sum to ten and squared errors to forty-two. Its MAE is 2.5 and MSE 10.5, worse than the baseline on this small file.
Worked example: The action loss can reverse the MAE ranking
Forecast A has MAE 0.5 and loss 200. Forecast B has MAE 1.0 and loss 80 under underage cost 100 and overage cost 20. Report both the prediction metric and the decision convention.