Efficient probabilistic reconciliation of forecasts for real-valued and count time series Lorenzo ZambonDario AzzimontiGiorgio Corani

2025-05-03 0 0 764.73KB 27 页 10玖币
侵权投诉
Efficient probabilistic reconciliation of forecasts
for real-valued and count time series
Lorenzo Zambon,Dario AzzimontiGiorgio Corani
Abstract
Hierarchical time series are common in several applied fields. The fore-
casts for these time series are required to be coherent, that is, to satisfy
the constraints given by the hierarchy. The most popular technique to
enforce coherence is called reconciliation, which adjusts the base forecasts
computed for each time series. However, recent works on probabilistic
reconciliation present several limitations. In this paper, we propose a new
approach based on conditioning to reconcile any type of forecast distribu-
tion. We then introduce a new algorithm, called Bottom-Up Importance
Sampling, to efficiently sample from the reconciled distribution. It can
be used for any base forecast distribution: discrete, continuous, or in
the form of samples, providing a major speedup compared to the current
methods. Experiments on several temporal hierarchies show a significant
improvement over base probabilistic forecasts.
Keywords: Forecast reconciliation, Probabilistic reconciliation, Tempo-
ral hierarchies, Importance sampling
1 Introduction
Often time series are organized into a hierarchy. For example, the total
visitors of a country can be divided into regions and the visitors of each
region can be further divided into sub-regions. Such data structures are
referred to as hierarchical time series; they are common in fields such as
retail sales [Makridakis et al., 2021] and energy modelling [Taieb et al.,
2021].
The forecasts for hierarchical time series should respect some summing
constraints, in which case they are referred to as coherent. For instance,
the sum of the forecasts for the sub-regions should match the forecast for
the entire region. However, the forecasts independently produced for each
time series (base forecasts) are generally incoherent.
IDSIA, Dalle Molle Institute for Artificial Intelligence, CH-6962, Lugano, Switzerland;
{lorenzo.zambon, dario.azzimonti, giorgio.corani}@idsia.ch
Department of Mathematics, University of Pavia, 27100, Pavia, Italy
1
arXiv:2210.02286v3 [stat.ML] 12 Oct 2023
Reconciliation algorithms [Hyndman et al., 2011, Wickramasuriya et al.,
2019] adjust the incoherent base forecasts, making them coherent. Rec-
onciled forecasts are generally more accurate than base forecasts: indeed,
forecast reconciliation is a special case of forecast combination [Hollyman
et al., 2021]. An important application of reconciliation algorithms is con-
stituted by temporal hierarchies [Athanasopoulos et al., 2017, Kourentzes
and Athanasopoulos, 2021], which make coherent the forecasts produced
for the same time series at different temporal scales.
Most reconciliation algorithms [Hyndman et al., 2011, Wickramasuriya
et al., 2019, 2020, Di Fonzo and Girolimetto, 2021, 2022] provide only rec-
onciled point forecasts. It is however clear [Kolassa, 2023] that reconciled
predictive distributions are needed for decision making.
Probabilistic reconciliation has been addressed only recently; earlier
attempts [Jeon et al., 2019, Taieb et al., 2021], though experimentally ef-
fective, lacked a strong formal justification. For the case of Gaussian base
forecasts, Corani et al. [2020] obtains the reconciled distribution in ana-
lytical form introducing the approach of reconciliation via conditioning.
Panagiotelis et al. [2023] provides a framework for probabilistic reconcil-
iation via projection. However this approach cannot reconcile discrete
distributions. Corani et al. [2023] performs probabilistic reconciliation
via conditioning of count time series by adopting the concept of virtual
evidence [Pearl, 1988]. However its implementation in probabilistic pro-
gramming, based on Markov Chain Monte Carlo (MCMC), is too slow on
large hierarchies; moreover it requires the base forecast distribution to be
in parametric form.
The main contribution of this paper is the Bottom-Up Importance
Sampling (BUIS) algorithm, which samples from the reconciled distribu-
tion obtained via conditioning with a substantial speedup with respect to
Corani et al. [2023]. BUIS can be used even when the base forecast dis-
tribution is only available through samples. This is the case of forecasts
returned by models for time series of counts [Liboschik et al., 2017] or
based on deep learning [Salinas et al., 2020]. We prove the convergence
of BUIS to the actual reconciled distribution. An implementation of the
algorithm in the Rlanguage is available in the Rpackage bayesRecon
[Azzimonti et al., 2023].
We provide two further formal contributions. The first is a definition
of coherence for probabilistic forecasts that applies to both discrete and
continuous distributions. The second is a novel interpretation of the rec-
onciliation via conditioning, in which the base forecast distribution is con-
ditioned on the hierarchy constraints. This allows for a unified treatment
of the reconciliation of discrete and continuous forecast distributions. We
test our method exhaustively on temporal hierarchies reporting positive
results both for the accuracy and the efficiency of our method.
The paper is organized as follows. In Sec. 2, we introduce the notation
and the reconciliation of point forecasts. In Sec. 3, we introduce our ap-
proach to reconciliation via conditioning and we compare it to the existing
literature. In Sec. 4, we introduce the Bottom-Up Importance Sampling
algorithm. We empirically verify its correctness in Sec. 5, while in Sec. 6
we test it on different data sets. We present the conclusions in Sec. 7.
2
U1
U2
B1B2
U3
B3B4
Figure 1: A hierarchy with 4bottom and 3upper variables.
2 Notation
Consider the hierarchy of Fig. 1. We denote by b= [b1,...,bnb]Tthe
vector of bottom variables, and by u= [u1,...,unu]Tthe vector of upper
variables. We then denote by
y="u
b#Rn
the vector of all the variables. The hierarchy can be expressed as a set of
linear constraints:
y=Sb,where S="A
I#.(1)
We refer to IRnb×nbas the identity matrix, to SRn×nbas the
summing matrix and to ARnu×nbas the aggregating matrix. We can
thus write the constraints as u=Ab. For example, the aggregating
matrix of the hierarchy in Fig. 1 is:
A=
1111
1100
0011
.
A point yRnis coherent if it satisfies the constraints given by the
hierarchy. We denote by Sthe set of coherent points, which is a linear
subspace of Rn:
S:= {yRn:y=Sb}.(2)
2.1 Temporal hierarchies
In temporal hierarchies [Athanasopoulos et al., 2017, Kourentzes and
Athanasopoulos, 2021], forecasts are generated for the same time series
at different temporal scales. For instance, a quarterly time series can be
aggregated to the semi-annual and the annual scale. If we are interested
in predictions up to one year ahead, we compute four quarterly fore-
casts ˆq1,ˆq2,ˆq3,ˆq4, two semi-annual forecasts ˆs1,ˆs2, and an annual forecast
3
ˆa1. We then obtain the hierarchy in Fig. 1. The base point forecasts,
independently computed at each frequency, are ˆ
b= [ˆq1,ˆq2,ˆq3,ˆq4]Tand
ˆ
u= [ˆa1,ˆs1,ˆs2]T.
2.2 Point forecasts reconciliation
Let us denote by ˆ
y=ˆ
uT|ˆ
bTTthe vector of the base (incoherent) fore-
casts. Note that, for ease of notation, we drop the time subscript. Point
reconciliation is generally performed in two steps [Hyndman et al., 2011,
Wickramasuriya et al., 2019]. First, the reconciled bottom forecasts are
computed by linearly combining the base forecasts of the entire hierarchy:
˜
b=Gˆ
y,
for some matrix GRm×n. Then, the reconciled forecasts for the whole
hierarchy are given by:
˜
y=S˜
b.
The state-of-the-art reconciliation method is MinT [Wickramasuriya et al.,
2019], which defines Gas:
G= (STW1S)1STW1,
where Wis the covariance matrix of the errors of the base forecasts. This
method minimizes the expected sum of the squared errors of the reconciled
forecasts, under the assumption of unbiased base forecasts.
2.3 Probabilistic reconciliation
Probabilistic reconciliation requires a probabilistic framework, in which
forecasts are in the form of probability distributions. We denote by
ˆν∈ P(Rn) the forecast distribution for y, where P(Rn) is the space of
probability measures on (Rn,B(Rn)), and B(Rn) is the Borel σ-algebra
on Rn. Moreover, we denote by ˆνuand ˆνbthe marginal distributions of,
respectively, the forecasts for the upper and the bottom components of y.
The forecast distribution ˆνmay be either discrete or absolutely con-
tinuous. In the following, if there is no ambiguity, we will use ˆπto denote
either its probability mass function, in the former case, or its density, in
the latter. Therefore, if ˆνis discrete, we have
ˆν(F) = X
xF
ˆπ(x),
for any F∈ B(Rn). Note that the sum is well-defined as ˆπ(x)>0 for at
most countably many x’s. On the contrary, if ˆνis absolutely continuous,
for any F∈ B(Rn) we have
ˆν(F) = ZF
ˆπ(x)dx.
4
3 Probabilistic Reconciliation
We now discuss coherence in the probabilistic framework and our approach
to probabilistic reconciliation.
Recall that a point forecast is incoherent if it does not belong to the
set S, defined as in (2). Let ˆν∈ P(Rn) be a forecast distribution. Thus,
ˆνis incoherent if there exists a set Tof incoherent points, i.e. T∩ S =,
such that ˆν(T)>0. Or, equivalently, if supp(ˆν)S. We now define the
summing map s:RnbRnas
s(b) = Sb.(3)
The image of sis given by S. Moreover, from (3) and (1), sis injective.
Hence, sis a bijective map between Rnband S, with inverse given by
s1(y) = b, where y= (u,b)∈ S. As explained in Panagiotelis et al.
[2023], for any ν∈ P(Rnb) we may obtain a distribution ˜ν∈ P(S) as
˜ν=s#ν, namely the pushforward of νusing s:
˜ν(F) = ν(s1(F)),F∈ B(S),
where s1(F) := {bRnb:s(b)F}is the preimage of F. In other
words, s#builds a probability distribution for ysupported on the coherent
subspace Sfrom a distribution on the bottom variables b. Since sis a
measurable bijective map, s#is a bijection between P(Rnb) and P(S),
with inverse given by (s1)#(Appendix A). We thus propose the following
definition.
Definition 1. We call coherent distribution any distribution ν∈ P(Rnb).
This definition works with any type of distribution. Moreover, it can
be used even if the constraints are not linear, as it does not require sto
be a linear map.
3.1 Probabilistic reconciliation
The aim of probabilistic reconciliation is to obtain a coherent reconciled
distribution ˜ν∈ P(Rnb) from the base forecast distribution ˆν∈ P(Rn).
The probabilistic bottom-up approach, which simply ignores any prob-
abilistic information about the upper series, is obtained by setting ˜ν= ˆνb.
Panagiotelis et al. [2023] proposes a reconciliation method based on
projection. Given a continuous map ψ:Rn→ S, the reconciled dis-
tribution ˜ν∈ P(S) is defined as the push-forward of the base forecast
distribution ˆνusing ψ:
˜ν=ψ#ˆν,
i.e. ˜ν(F) = ˆν(ψ1(F)), for any F∈ B(Rn). Hence, if y1,...,yNare inde-
pendent samples from ˆν, then ψ(y1),...,ψ(yN) are independent samples
from ˜ν. The map ψis expressed as ψ=sg, where g:RnRnbcom-
bines information from all the levels by projecting on the bottom level.
gis assumed to be in the form g(y) = d+Gy, and the parameters
γ:= (d,vec(G)) Rnb+nb×nare optimized through stochastic gradient
descent (SGD) to minimize a chosen scoring rule. This approach therefore
can only be used with continuous distributions.
5
摘要:

Efficientprobabilisticreconciliationofforecastsforreal-valuedandcounttimeseriesLorenzoZambon∗,†DarioAzzimonti∗GiorgioCorani∗AbstractHierarchicaltimeseriesarecommoninseveralappliedfields.Thefore-castsforthesetimeseriesarerequiredtobecoherent,thatis,tosatisfytheconstraintsgivenbythehierarchy.Themostpo...

展开>> 收起<<
Efficient probabilistic reconciliation of forecasts for real-valued and count time series Lorenzo ZambonDario AzzimontiGiorgio Corani.pdf

共27页,预览5页

还剩页未读, 继续阅读

声明:本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。玖贝云文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知玖贝云文库,我们立即给予删除!
分类:图书资源 价格:10玖币 属性:27 页 大小:764.73KB 格式:PDF 时间:2025-05-03

开通VIP享超值会员特权

  • 多端同步记录
  • 高速下载文档
  • 免费文档工具
  • 分享文档赚钱
  • 每日登录抽奖
  • 优质衍生服务
/ 27
客服
关注