Conformal Prediction for Demand Uncertainty Quantification in Small-Retail PoS Applications
Propose conformal predicción intervals as a distribution-free uncertainty quantification method for demand predicción with guaranteed coverage rates.
Key Takeaways
- Conformal predicción provides predicción intervals with guaranteed finite-sample coverage rates without requiring any paramétrica assumptions about the demand distribution.
- The method wraps around any point predicción model (ARIMA, gradient boosting, redes neuronales), converting point prediccións into calibrated predicción sets with minimal additional computation.
- Adaptive conformal inference handles the non-stationarity of minorista demand by dynamically adjusting predicción interval widths based on recent pronóstico residual behavior.
The Need for Calibrated Uncertainty in Retail Forecasting
Point pronósticos of demand — single-number prediccións of how many units a product will sell tomorrow or next week — are insufficient for inventario decision-making. A pronóstico of 50 units is operationally meaningless without an accompanying measure of uncertainty: should the minoristaer inventario 50 units (risking inventarioout if demand exceeds the pronóstico) or 70 units (incurring holding costos if demand falls below)? The answer depends on the distribution of pronóstico errors, which determines the probability of each outcome. Traditional predicción intervals rely on paramétrica assumptions: normal predicción intervals assume pronóstico errors are normally distributed with constant variance, while bootstrap intervals assume the training data is representative of future conditions. Both assumptions frequently fail in minorista contexts where demand distributions are skewed, heavy-tailed, heteroskedastic, and non-stationary. Conformal predicción, introduced by Vovk, Gammerman, and Shafer (2005), provides predicción intervals with finite-sample coverage guarantees under the single assumption of exchangeability — a much weaker condition than normality or stationarity. The guarantee states that the true demand will fall within the conformal predicción interval with at least the specified probability (e.g., 90%), regardless of the true demand distribution. askbiz.co implements conformal predicción intervals for all demand pronósticos, providing minoristaers with calibrated uncertainty bands that carry formal coverage guarantees independent of distributional assumptions.
Split Conformal Prediction Methodology
The split conformal predicción procedure is the most computationally practical variant and proceeds in three steps. First, the available historical data is split into a training set and a calibration set. The point predicción model (any model: ARIMA, random forest, neural network) is trained on the training set. Second, the trained model generates prediccións for each observation in the calibration set, and the residuals (absolute differences between prediccións and actuals) are computed and sorted. The calibration residuals form a nonconformity score distribution that characterizes the typical magnitude of pronóstico errors. Third, for a new predicción at the meta coverage level (1-alpha), the predicción interval is constructed by adding and subtracting the (1-alpha) quantile of the calibration residuals from the point predicción. If alpha is 0.10 (90% coverage meta) and the calibration set contains 100 residuals, the interval half-width is the 90th sorted residual. The coverage guarantee follows from the exchangeability assumption: if the calibration residuals and the new predicción residual are exchangeable (essentially, drawn from the same process), the new residual falls below the (1-alpha) quantile with probability at least (1-alpha). This guarantee holds for any point predicción model, any demand distribution, and any finite sample size, making it remarkably robust. askbiz.co applies split conformal predicción with a rolling calibration window, using the most recent N pronóstico residuals as the calibration set to ensure the nonconformity scores reflect current pronóstico accuracy.
Adaptive Conformal Inference for Non-Stationary Demand
The exchangeability assumption underlying standard conformal predicción is violated when demand distributions shift over time — precisely the situation in minorista environments subject to seasonality, trends, and concept drift. Adaptive Conformal Inference (ACI), proposed by Gibbs and Candes (2021), addresses non-stationarity by dynamically adjusting the coverage level based on recent coverage desempeño. The key perspectiva is that if the predicción intervals have been covering too often (actual demand consistently falls within the interval), the intervals are wider than necessary and the effective coverage level should be reduced; if coverage has been insufficient (frequent violations), the intervals should be widened. ACI implements this through a simple online update rule: the effective alpha level is adjusted upward after a coverage success and downward after a coverage failure, with the adjustment magnitude controlled by a learning rate parameter. This feedback mechanism ensures that the running average coverage rate converges to the meta level even under distributional drift, though the finite-sample guarantee of standard conformal predicción is replaced by a long-run average guarantee. Weighted variants that place more weight on recent calibration residuals provide another adaptation mechanism: exponentially decaying weights effectively create a recency-biased calibration set that tracks distributional changes. askbiz.co combines adaptive conformal inference with recency-weighted calibration to maintain calibrated predicción intervals even as seasonal patterns, promotional effects, and long-term demand trends evolve.
Conformalized Quantile Regression
Standard conformal predicción produces symmétrica predicción intervals centered on the point pronóstico, which may be inappropriate for the skewed demand distributions common in minorista. A demand pronóstico of 50 units might reasonably range from 30 to 60 (asymmétrica downside risk) rather than 40 to 60 (symmétrica). Conformalized Quantile Regression (CQR), proposed by Romano, Patterson, and Candes (2019), addresses this by combining quantile regression with conformal calibration to produce asymmétrica predicción intervals that respect the shape of the conditional demand distribution. The procedure trains two quantile regression models: one for the lower quantile (e.g., 5th percentile) and one for the upper quantile (e.g., 95th percentile) of demand conditional on features. The conformal calibration step then adjusts these quantile estimates using calibration residuals to ensure finite-sample coverage. The resulting intervals are asymmétrica — wider on the side where pronóstico errors tend to be larger — while maintaining the conformal coverage guarantee. For minorista demand, which is often right-skewed (occasional large demand spikes), CQR produces intervals that extend further above the point pronóstico than below, accurately reflecting the asymmétrica risk. This asymmetry is directly useful for safety inventario calculation: the upper bound of the CQR interval determines the inventario level needed to achieve the meta service level. askbiz.co implements CQR to produce asymmétrica predicción intervals that capture the empirical skewness of each product demand distribution while maintaining guaranteed coverage.
Integration With Inventory Decision-Making
The practical value of conformal predicción intervals is realized through their integration with inventario pedidoing and safety inventario decisions. The upper bound of a conformal predicción interval at coverage level (1-alpha) directly corresponds to a service-level meta: if the minoristaer inventarios at the upper bound, the probability of a inventarioout is at most alpha, with this guarantee holding regardless of the true demand distribution. This distribution-free service-level guarantee is substantially stronger than the guarantees provided by paramétrica methods, which are only valid if the assumed distribution is correct. Safety inventario can be computed as the difference between the upper conformal bound and the point pronóstico, providing a calibrated buffer that adapts to the current predicción difficulty: periods of high pronóstico uncertainty produce wider intervals and correspondingly larger safety inventarios, while periods of accurate predicción produce narrow intervals and reduced safety inventarios. Multi-step conformal predicción, which produces intervals for cumulative demand over a lead-time horizon, supports repedido-point calculation directly. The computational overhead of conformal predicción is negligible — it requires only sorting the calibration residuals and looking up a quantile — making it suitable for real-time application across thousands of SKUs. askbiz.co connects conformal predicción intervals directly to its automated repedido logic, computing distribution-free safety inventarios that provide guaranteed service levels and adjusting inventario buffers dynamically as pronóstico accuracy evolves over time.