SlideShare une entreprise Scribd logo
1  sur  197
Télécharger pour lire hors ligne
Rob J Hyndman
Visualizing and forecasting
big time series data
Victoria: scaled
Outline
1 Examples of big time series
2 Time series visualisation
3 BLUF: Best Linear Unbiased Forecasts
4 Application: Australian tourism
5 Application: Australian labour market
6 Fast computation tricks
7 hts package for R
8 References
Visualising and forecasting big time series data Examples of big time series 2
1. Australian tourism demand
Visualising and forecasting big time series data Examples of big time series 3
1. Australian tourism demand
Visualising and forecasting big time series data Examples of big time series 3
Quarterly data on visitor night from
1998:Q1 – 2013:Q4
From: National Visitor Survey, based on
annual interviews of 120,000 Australians
aged 15+, collected by Tourism Research
Australia.
Split by 7 states, 27 zones and 76 regions
(a geographical hierarchy)
Also split by purpose of travel
Holiday
Visiting friends and relatives (VFR)
Business
Other
304 bottom-level series
2. Labour market participation
Australia and New Zealand Standard
Classification of Occupations
8 major groups
43 sub-major groups
97 minor groups
– 359 unit groups
* 1023 occupations
Example: statistician
2 Professionals
22 Business, Human Resource and Marketing
Professionals
224 Information and Organisation Professionals
2241 Actuaries, Mathematicians and Statisticians
224113 Statistician
Visualising and forecasting big time series data Examples of big time series 4
2. Labour market participation
Australia and New Zealand Standard
Classification of Occupations
8 major groups
43 sub-major groups
97 minor groups
– 359 unit groups
* 1023 occupations
Example: statistician
2 Professionals
22 Business, Human Resource and Marketing
Professionals
224 Information and Organisation Professionals
2241 Actuaries, Mathematicians and Statisticians
224113 Statistician
Visualising and forecasting big time series data Examples of big time series 4
3. PBS sales
Visualising and forecasting big time series data Examples of big time series 5
3. PBS sales
ATC drug classification
A Alimentary tract and metabolism
B Blood and blood forming organs
C Cardiovascular system
D Dermatologicals
G Genito-urinary system and sex hormones
H Systemic hormonal preparations, excluding sex hormones
and insulins
J Anti-infectives for systemic use
L Antineoplastic and immunomodulating agents
M Musculo-skeletal system
N Nervous system
P Antiparasitic products, insecticides and repellents
R Respiratory system
S Sensory organs
V Various
Visualising and forecasting big time series data Examples of big time series 6
3. PBS sales
ATC drug classification
A Alimentary tract and metabolism14 classes
A10 Drugs used in diabetes84 classes
A10B Blood glucose lowering drugs
A10BA Biguanides
A10BA02 Metformin
Visualising and forecasting big time series data Examples of big time series 7
4. Spectacle sales
Visualising and forecasting big time series data Examples of big time series 8
Monthly sales data from 2000 – 2014
Provided by a large spectacle manufacturer
Split by brand (26), gender (3), price range
(6), materials (4), and stores (600)
About a million bottom-level series
4. Spectacle sales
Visualising and forecasting big time series data Examples of big time series 8
Monthly sales data from 2000 – 2014
Provided by a large spectacle manufacturer
Split by brand (26), gender (3), price range
(6), materials (4), and stores (600)
About a million bottom-level series
4. Spectacle sales
Visualising and forecasting big time series data Examples of big time series 8
Monthly sales data from 2000 – 2014
Provided by a large spectacle manufacturer
Split by brand (26), gender (3), price range
(6), materials (4), and stores (600)
About a million bottom-level series
4. Spectacle sales
Visualising and forecasting big time series data Examples of big time series 8
Monthly sales data from 2000 – 2014
Provided by a large spectacle manufacturer
Split by brand (26), gender (3), price range
(6), materials (4), and stores (600)
About a million bottom-level series
Hierarchical time series
A hierarchical time series is a collection of
several time series that are linked together in
a hierarchical structure.
Total
A
AA AB AC
B
BA BB BC
C
CA CB CC
Examples
Net labour turnover
Pharmaceutical sales
Tourism by state and region
Visualising and forecasting big time series data Examples of big time series 9
Hierarchical time series
A hierarchical time series is a collection of
several time series that are linked together in
a hierarchical structure.
Total
A
AA AB AC
B
BA BB BC
C
CA CB CC
Examples
Net labour turnover
Pharmaceutical sales
Tourism by state and region
Visualising and forecasting big time series data Examples of big time series 9
Hierarchical time series
A hierarchical time series is a collection of
several time series that are linked together in
a hierarchical structure.
Total
A
AA AB AC
B
BA BB BC
C
CA CB CC
Examples
Net labour turnover
Pharmaceutical sales
Tourism by state and region
Visualising and forecasting big time series data Examples of big time series 9
Hierarchical time series
A hierarchical time series is a collection of
several time series that are linked together in
a hierarchical structure.
Total
A
AA AB AC
B
BA BB BC
C
CA CB CC
Examples
Net labour turnover
Pharmaceutical sales
Tourism by state and region
Visualising and forecasting big time series data Examples of big time series 9
Grouped time series
A grouped time series is a collection of time
series that can be grouped together in a
number of non-hierarchical ways.
Total
A
AX AY
B
BX BY
Total
X
AX BX
Y
AY BY
Examples
Tourism by state and purpose of travel
Glasses by brand and store
Visualising and forecasting big time series data Examples of big time series 10
Grouped time series
A grouped time series is a collection of time
series that can be grouped together in a
number of non-hierarchical ways.
Total
A
AX AY
B
BX BY
Total
X
AX BX
Y
AY BY
Examples
Tourism by state and purpose of travel
Glasses by brand and store
Visualising and forecasting big time series data Examples of big time series 10
Grouped time series
A grouped time series is a collection of time
series that can be grouped together in a
number of non-hierarchical ways.
Total
A
AX AY
B
BX BY
Total
X
AX BX
Y
AY BY
Examples
Tourism by state and purpose of travel
Glasses by brand and store
Visualising and forecasting big time series data Examples of big time series 10
Outline
1 Examples of big time series
2 Time series visualisation
3 BLUF: Best Linear Unbiased Forecasts
4 Application: Australian tourism
5 Application: Australian labour market
6 Fast computation tricks
7 hts package for R
8 References
Visualising and forecasting big time series data Time series visualisation 11
Victorian tourism dataBAAHolBABHol
BAAVisBABVis
BAABusBABBus
BAAOthBABOth
BACHolBBAHol
BACVisBBAVis
BACBusBBABus
BACOthBBAOth
BCAHolBCBHol
BCAVisBCBVis
BCABusBCBBus
BCAOthBCBOth
BCCHolBDAHol
BCCVisBDAVis
BCCBusBDABus
BCCOthBDAOth
BDBHolBDCHol
BDBVisBDCVis
BDBBusBDCBus
BDBOthBDCOth
BDDHolBDEHol
BDDVisBDEVis
BDDBusBDEBus
BDDOthBDEOth
BDFHolBEAHol
BDFVisBEAVis
BDFBusBEABus
BDFOthBEAOth
BEBHolBECHol
BEBVisBECVis
BEBBusBECBus
BEBOthBECOth
BEDHolBEEHol
BEDVisBEEVis
BEDBusBEEBus
BEDOthBEEOth
BEFHolBEGHol
BEFVisBEGVis
BEFBusBEGBus
BEFOthBEGOth
Visualising and forecasting big time series data Time series visualisation 12
Kite diagrams
000
Line graph profile
Duplicate & flip
around the hori-
zontal axis
Fill the colour
Visualising and forecasting big time series data Time series visualisation 13
Kite diagrams: Victorian tourism
20002010
Holiday
20002010
VFR
20002010
Business
20002010
BAA
BAB
BAC
BBA
BCA
BCB
BCC
BDA
BDB
BDC
BDD
BDE
BDF
BEA
BEB
BEC
BED
BEE
BEF
Other
BEG
Victoria
Visualising and forecasting big time series data Time series visualisation 14
Kite diagrams: Victorian tourism
Visualising and forecasting big time series data Time series visualisation 14
Kite diagrams: Victorian tourism
20002010
Holiday
20002010
VFR
20002010
Business
20002010
BAA
BAB
BAC
BBA
BCA
BCB
BCC
BDA
BDB
BDC
BDD
BDE
BDF
BEA
BEB
BEC
BED
BEE
BEF
Other
BEG
Victoria: scaled
Visualising and forecasting big time series data Time series visualisation 14
An STL decomposition
STL decomposition of tourism demand
for holidays in Peninsula
5.06.07.0
data
−0.50.5
seasonal
5.86.16.4
trend
−0.40.0
2000 2005 2010
remainder
Visualising and forecasting big time series data Time series visualisation 15
Seasonal stacked bar chart
Place positive values above the origin
while negative values below the origin
Map the bar length to the magnitude
Encode quarters by colours
Visualising and forecasting big time series data Time series visualisation 16
Seasonal stacked bar chart
Place positive values above the origin
while negative values below the origin
Map the bar length to the magnitude
Encode quarters by colours
−1.0
−0.5
0.0
0.5
1.0
Holiday
BAA BABBACBBABCABCBBCCBDABDBBDCBDDBDEBDF BEA BEBBECBEDBEE BEFBEG
Regions
SeasonalComponent
Qtr
Q1
Q2
Q3
Q4
Visualising and forecasting big time series data Time series visualisation 16
Seasonal stacked bar chart: VIC
Visualising and forecasting big time series data Time series visualisation 17
Seasonal stacked bar chart: VIC
−1.0
−0.5
0.0
0.5
1.0
−1.0
−0.5
0.0
0.5
1.0
−1.0
−0.5
0.0
0.5
1.0
−1.0
−0.5
0.0
0.5
1.0
HolidayVFRBusinessOther
BAABABBACBBABCABCBBCCBDABDBBDCBDDBDEBDFBEABEBBECBEDBEEBEFBEG
Regions
SeasonalComponent
Qtr
Q1
Q2
Q3
Q4
Visualising and forecasting big time series data Time series visualisation 17
Corrgram of remainder
Visualising and forecasting big time series data Time series visualisation 18
Compute the correlations
among the remainder
components
Render both the sign and
magnitude using a colour
mapping of two hues
Order variables according to
the first principal component of
the correlations.
Corrgram of remainder: VIC
Visualising and forecasting big time series data Time series visualisation 19
−1
−0.8
−0.6
−0.4
−0.2
0
0.2
0.4
0.6
0.8
1
BEEHolBEFOthBEEOthBDEOthBEBOthBEABusBEFBusBDCOthBACHolBEBBusBEAVisBBAHolBDEHolBABOthBAAVisBAAHolBDCHolBBABusBCBHolBEGBusBDDVisBABVisBDAVisBEAOthBDFHolBEEBusBAAOthBACOthBDAOthBDEBusBCBOthBACBusBEBVisBACVisBCAOthBEFVisBCBVisBEDHolBEGOthBDBHolBABBusBEBHolBDFBusBECHolBCAHolBDBOthBEAHolBDCBusBECVisBDBVisBCCHolBBAVisBABHolBBAOthBCCOthBCBBusBCCVisBEGVisBDDHolBECOthBDCVisBAABusBCCBusBECBusBCAVisBDFVisBEGHolBDDOthBEDOthBEDVisBDDBusBDEVisBEFHolBEEVisBDBBusBDABusBDAHolBCABusBDFOthBEDBus
BEEHolBEFOthBEEOthBDEOthBEBOthBEABusBEFBusBDCOthBACHolBEBBusBEAVisBBAHolBDEHolBABOthBAAVisBAAHolBDCHolBBABusBCBHolBEGBusBDDVisBABVisBDAVisBEAOthBDFHolBEEBusBAAOthBACOthBDAOthBDEBusBCBOthBACBusBEBVisBACVisBCAOthBEFVisBCBVisBEDHolBEGOthBDBHolBABBusBEBHolBDFBusBECHolBCAHolBDBOthBEAHolBDCBusBECVisBDBVisBCCHolBBAVisBABHolBBAOthBCCOthBCBBusBCCVisBEGVisBDDHolBECOthBDCVisBAABusBCCBusBECBusBCAVisBDFVisBEGHolBDDOthBEDOthBEDVisBDDBusBDEVisBEFHolBEEVisBDBBusBDABusBDAHolBCABusBDFOthBEDBus
Corrgram of remainder: VIC
Visualising and forecasting big time series data Time series visualisation 19
−1
−0.8
−0.6
−0.4
−0.2
0
0.2
0.4
0.6
0.8
1
BDAHol
BDDHol
BEBHol
BEFHol
BECHol
BEDHol
BDFHol
BCCHol
BDCHol
BCAHol
BEAHol
BEGHol
BBAHol
BAAHol
BABHol
BDBHol
BDEHol
BACHol
BCBHol
BEEHol
BDAHol
BDDHol
BEBHol
BEFHol
BECHol
BEDHol
BDFHol
BCCHol
BDCHol
BCAHol
BEAHol
BEGHol
BBAHol
BAAHol
BABHol
BDBHol
BDEHol
BACHol
BCBHol
BEEHol
Corrgram of remainder: TAS
Visualising and forecasting big time series data Time series visualisation 20
−1
−0.8
−0.6
−0.4
−0.2
0
0.2
0.4
0.6
0.8
1
FCAHol
FBBHol
FBAHol
FAAHol
FCBHol
FCAVis
FBBVis
FAAVis
FCBBus
FAAOth
FCAOth
FBBOth
FBABus
FBAOth
FCBVis
FCABus
FBAVis
FCBOth
FBBBus
FAABus
FCAHol
FBBHol
FBAHol
FAAHol
FCBHol
FCAVis
FBBVis
FAAVis
FCBBus
FAAOth
FCAOth
FBBOth
FBABus
FBAOth
FCBVis
FCABus
FBAVis
FCBOth
FBBBus
FAABus
Principal components decomposition
Visualising and forecasting big time series data Time series visualisation 21
−25−15−55
PC1
−50510
PC2
−50510
2000 2005 2010
PC3
Time
First three PCs
Principal components decomposition
Visualising and forecasting big time series data Time series visualisation 21
−25−20−15−10−505
Season plot: PC1
Month
q
q
q
q
q
q
q
q q
q
q
q
q
q q
q
q
q
q
q
q
q
q q
q
q q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q q
q
q
q
q
q
q
q
q
q
q
q
q
q
q q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q q
q
q
q
q
q
q
q
q
q
q
q
q q
q
q
q
q
q
q
q
q
q
q
q
q
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
Principal components decomposition
Visualising and forecasting big time series data Time series visualisation 21
−50510
Season plot: PC2
Month
q
q
q
q
q
q
q
q
q
q
q
q
q
q q
q
q
q
q
q
q
q
q
q
q
q
q
q q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q q
q
q
q
q
q
q
q
q
q
q
q
q
q q
q
q
q q
q
q
q q
q
q
q
q
q
q q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q q
q
q q
q
q
q
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
Principal components decomposition
Visualising and forecasting big time series data Time series visualisation 21
−50510
Season plot: PC3
Month
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q q
q
q
q
q
q
q
q
q
q
q
q
q
q
q q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q q
q
q
q
q
q
q
q
q
q
q q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q q
q
q
q
q
q
q
q q
q
q
q
q
q
q
q
q
q
q
q
q q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q q
q
q
q
q
q
q
q
q
q
q
q
q
q
q q q
q
q
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
Principal components decomposition
Visualising and forecasting big time series data Time series visualisation 22
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
qq
q q q
q
q
q q
q
q
q
qq
q
q
qq
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
qq
q
q
q
q
q
q
q
q
q
q
q
q
q
q q
q
q
q
q
q
q
q
q qq
q q
q
q
q
q
q
q
q
q q
q
q
q
q
q
q
q
qq
q
q
q
q
q
q
q
q
q
q
q q
q
q
q
q
qq q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
qq
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
qq
q
q
q
q
q
q
q
q
q
q
q
q
qq
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
qq
q
q
qq
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
−0.15 −0.10 −0.05 0.00 0.05
−0.100.000.050.100.150.20
Loading 1
Loading2
q
q
q
q
q
q
q
NSW
VIC
QLD
SA
TAS
NT
WA
Principal components decomposition
Visualising and forecasting big time series data Time series visualisation 22
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
qq
q q q
q
q
q q
q
q
q
qq
q
q
qq
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
qq
q
q
q
q
q
q
q
q
q
q
q
q
q
q q
q
q
q
q
q
q
q
q qq
q q
q
q
q
q
q
q
q
q q
q
q
q
q
q
q
q
qq
q
q
q
q
q
q
q
q
q
q
q q
q
q
q
q
qq q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
qq
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
qq
q
q
q
q
q
q
q
q
q
q
q
q
qq
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
qq
q
q
qq
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
−0.15 −0.10 −0.05 0.00 0.05
−0.100.000.050.100.150.20
Loading 1
Loading2
q
q
q
q
Hol
Vis
Bus
Oth
Feature analysis
Summarize each time series with a feature
vector:
strength of trend
summer seasonality
winter seasonality
Box-Pierce statistic on remainder of STL
Lumpiness (variance of annual variances of
remainder)
Do PCA on feature matrix
Visualising and forecasting big time series data Time series visualisation 23
Feature analysis
Summarize each time series with a feature
vector:
strength of trend
summer seasonality
winter seasonality
Box-Pierce statistic on remainder of STL
Lumpiness (variance of annual variances of
remainder)
Do PCA on feature matrix
Visualising and forecasting big time series data Time series visualisation 23
Feature analysis
Summarize each time series with a feature
vector:
strength of trend
summer seasonality
winter seasonality
Box-Pierce statistic on remainder of STL
Lumpiness (variance of annual variances of
remainder)
Do PCA on feature matrix
Visualising and forecasting big time series data Time series visualisation 23
Feature analysis
Summarize each time series with a feature
vector:
strength of trend
summer seasonality
winter seasonality
Box-Pierce statistic on remainder of STL
Lumpiness (variance of annual variances of
remainder)
Do PCA on feature matrix
Visualising and forecasting big time series data Time series visualisation 23
Feature analysis
Summarize each time series with a feature
vector:
strength of trend
summer seasonality
winter seasonality
Box-Pierce statistic on remainder of STL
Lumpiness (variance of annual variances of
remainder)
Do PCA on feature matrix
Visualising and forecasting big time series data Time series visualisation 23
Feature analysis
Summarize each time series with a feature
vector:
strength of trend
summer seasonality
winter seasonality
Box-Pierce statistic on remainder of STL
Lumpiness (variance of annual variances of
remainder)
Do PCA on feature matrix
Visualising and forecasting big time series data Time series visualisation 23
Feature analysis
Summarize each time series with a feature
vector:
strength of trend
summer seasonality
winter seasonality
Box-Pierce statistic on remainder of STL
Lumpiness (variance of annual variances of
remainder)
Do PCA on feature matrix
Visualising and forecasting big time series data Time series visualisation 23
Feature analysis
Visualising and forecasting big time series data Time series visualisation 24
q
q
q
q
q
q q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
qq
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q q
q
q
q
q
q
q
q
q q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
qq
q
q
q
q
q
q
q
q
q
qq
q q
q
q
q q
q
q
q
q
q
q
q q
q
q
q q
q
q
q
q
qq
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
qq
q
q
q
q
q
q
q
q
qq
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
qq
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
trend
summer
wintercorr
lum
py
−2
0
2
−5.0 −2.5 0.0 2.5
PC1 (39.1% explained var.)
PC2(23.6%explainedvar.)
groups
q
q
q
q
Bus
Hol
Oth
Vis
Feature analysis
Visualising and forecasting big time series data Time series visualisation 24
q
q
q
q
q
q q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
qq
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q q
q
q
q
q
q
q
q
q q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
qq
q
q
q
q
q
q
q
q
q
qq
q q
q
q
q q
q
q
q
q
q
q
q q
q
q
q q
q
q
q
q
qq
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
qq
q
q
q
q
q
q
q
q
qq
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
qq
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
trend
summer
wintercorr
lum
py
−2
0
2
−5.0 −2.5 0.0 2.5
PC1 (39.1% explained var.)
PC2(23.6%explainedvar.)
groups
q
q
q
q
q
q
q
NSW
NT
QLD
SA
TAS
VIC
WA
Outline
1 Examples of big time series
2 Time series visualisation
3 BLUF: Best Linear Unbiased Forecasts
4 Application: Australian tourism
5 Application: Australian labour market
6 Fast computation tricks
7 hts package for R
8 References
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 25
Hierarchical/grouped time series
Forecasts should be “aggregate
consistent”, unbiased, minimum variance.
Existing methods:
¢ Bottom-up
¢ Top-down
¢ Middle-out
How to compute forecast intervals?
Most research is concerned about relative
performance of existing methods.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 26
Hierarchical/grouped time series
Forecasts should be “aggregate
consistent”, unbiased, minimum variance.
Existing methods:
¢ Bottom-up
¢ Top-down
¢ Middle-out
How to compute forecast intervals?
Most research is concerned about relative
performance of existing methods.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 26
Hierarchical/grouped time series
Forecasts should be “aggregate
consistent”, unbiased, minimum variance.
Existing methods:
¢ Bottom-up
¢ Top-down
¢ Middle-out
How to compute forecast intervals?
Most research is concerned about relative
performance of existing methods.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 26
Hierarchical/grouped time series
Forecasts should be “aggregate
consistent”, unbiased, minimum variance.
Existing methods:
¢ Bottom-up
¢ Top-down
¢ Middle-out
How to compute forecast intervals?
Most research is concerned about relative
performance of existing methods.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 26
Hierarchical/grouped time series
Forecasts should be “aggregate
consistent”, unbiased, minimum variance.
Existing methods:
¢ Bottom-up
¢ Top-down
¢ Middle-out
How to compute forecast intervals?
Most research is concerned about relative
performance of existing methods.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 26
Hierarchical/grouped time series
Forecasts should be “aggregate
consistent”, unbiased, minimum variance.
Existing methods:
¢ Bottom-up
¢ Top-down
¢ Middle-out
How to compute forecast intervals?
Most research is concerned about relative
performance of existing methods.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 26
Hierarchical/grouped time series
Forecasts should be “aggregate
consistent”, unbiased, minimum variance.
Existing methods:
¢ Bottom-up
¢ Top-down
¢ Middle-out
How to compute forecast intervals?
Most research is concerned about relative
performance of existing methods.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 26
Top-down method
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 27
Advantages
Works well in
presence of low
counts.
Single forecasting
model easy to
build
Provides reliable
forecasts for
aggregate levels.
Disadvantages
Loss of information,
especially
individual series
dynamics.
Distribution of
forecasts to lower
levels can be
difficult
No prediction
intervals
Top-down method
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 27
Advantages
Works well in
presence of low
counts.
Single forecasting
model easy to
build
Provides reliable
forecasts for
aggregate levels.
Disadvantages
Loss of information,
especially
individual series
dynamics.
Distribution of
forecasts to lower
levels can be
difficult
No prediction
intervals
Top-down method
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 27
Advantages
Works well in
presence of low
counts.
Single forecasting
model easy to
build
Provides reliable
forecasts for
aggregate levels.
Disadvantages
Loss of information,
especially
individual series
dynamics.
Distribution of
forecasts to lower
levels can be
difficult
No prediction
intervals
Top-down method
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 27
Advantages
Works well in
presence of low
counts.
Single forecasting
model easy to
build
Provides reliable
forecasts for
aggregate levels.
Disadvantages
Loss of information,
especially
individual series
dynamics.
Distribution of
forecasts to lower
levels can be
difficult
No prediction
intervals
Top-down method
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 27
Advantages
Works well in
presence of low
counts.
Single forecasting
model easy to
build
Provides reliable
forecasts for
aggregate levels.
Disadvantages
Loss of information,
especially
individual series
dynamics.
Distribution of
forecasts to lower
levels can be
difficult
No prediction
intervals
Top-down method
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 27
Advantages
Works well in
presence of low
counts.
Single forecasting
model easy to
build
Provides reliable
forecasts for
aggregate levels.
Disadvantages
Loss of information,
especially
individual series
dynamics.
Distribution of
forecasts to lower
levels can be
difficult
No prediction
intervals
Bottom-up method
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 28
Advantages
No loss of
information.
Better captures
dynamics of
individual series.
Disadvantages
Large number of
series to be
forecast.
Constructing
forecasting models
is harder because
of noisy data at
bottom level.
No prediction
intervals
Bottom-up method
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 28
Advantages
No loss of
information.
Better captures
dynamics of
individual series.
Disadvantages
Large number of
series to be
forecast.
Constructing
forecasting models
is harder because
of noisy data at
bottom level.
No prediction
intervals
Bottom-up method
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 28
Advantages
No loss of
information.
Better captures
dynamics of
individual series.
Disadvantages
Large number of
series to be
forecast.
Constructing
forecasting models
is harder because
of noisy data at
bottom level.
No prediction
intervals
Bottom-up method
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 28
Advantages
No loss of
information.
Better captures
dynamics of
individual series.
Disadvantages
Large number of
series to be
forecast.
Constructing
forecasting models
is harder because
of noisy data at
bottom level.
No prediction
intervals
Bottom-up method
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 28
Advantages
No loss of
information.
Better captures
dynamics of
individual series.
Disadvantages
Large number of
series to be
forecast.
Constructing
forecasting models
is harder because
of noisy data at
bottom level.
No prediction
intervals
The BLUF approach
Hyndman et al (CSDA 2011) proposed a new
statistical framework for forecasting
hierarchical time series which:
1 provides point forecasts that are
consistent across the hierarchy;
2 allows for correlations and interaction
between series at each level;
3 provides estimates of forecast uncertainty
which are consistent across the hierarchy;
4 allows for ad hoc adjustments and
inclusion of covariates at any level.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 29
The BLUF approach
Hyndman et al (CSDA 2011) proposed a new
statistical framework for forecasting
hierarchical time series which:
1 provides point forecasts that are
consistent across the hierarchy;
2 allows for correlations and interaction
between series at each level;
3 provides estimates of forecast uncertainty
which are consistent across the hierarchy;
4 allows for ad hoc adjustments and
inclusion of covariates at any level.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 29
The BLUF approach
Hyndman et al (CSDA 2011) proposed a new
statistical framework for forecasting
hierarchical time series which:
1 provides point forecasts that are
consistent across the hierarchy;
2 allows for correlations and interaction
between series at each level;
3 provides estimates of forecast uncertainty
which are consistent across the hierarchy;
4 allows for ad hoc adjustments and
inclusion of covariates at any level.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 29
The BLUF approach
Hyndman et al (CSDA 2011) proposed a new
statistical framework for forecasting
hierarchical time series which:
1 provides point forecasts that are
consistent across the hierarchy;
2 allows for correlations and interaction
between series at each level;
3 provides estimates of forecast uncertainty
which are consistent across the hierarchy;
4 allows for ad hoc adjustments and
inclusion of covariates at any level.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 29
Hierarchical data
Total
A B C
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 30
Yt : observed aggregate of all
series at time t.
YX,t : observation on series X at
time t.
Bt : vector of all series at
bottom level in time t.
Hierarchical data
Total
A B C
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 30
Yt : observed aggregate of all
series at time t.
YX,t : observation on series X at
time t.
Bt : vector of all series at
bottom level in time t.
Hierarchical data
Total
A B C
yt = [Yt, YA,t, YB,t, YC,t] =




1 1 1
1 0 0
0 1 0
0 0 1






YA,t
YB,t
YC,t


Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 30
Yt : observed aggregate of all
series at time t.
YX,t : observation on series X at
time t.
Bt : vector of all series at
bottom level in time t.
Hierarchical data
Total
A B C
yt = [Yt, YA,t, YB,t, YC,t] =




1 1 1
1 0 0
0 1 0
0 0 1




S


YA,t
YB,t
YC,t


Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 30
Yt : observed aggregate of all
series at time t.
YX,t : observation on series X at
time t.
Bt : vector of all series at
bottom level in time t.
Hierarchical data
Total
A B C
yt = [Yt, YA,t, YB,t, YC,t] =




1 1 1
1 0 0
0 1 0
0 0 1




S


YA,t
YB,t
YC,t


Bt
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 30
Yt : observed aggregate of all
series at time t.
YX,t : observation on series X at
time t.
Bt : vector of all series at
bottom level in time t.
Hierarchical data
Total
A B C
yt = [Yt, YA,t, YB,t, YC,t] =




1 1 1
1 0 0
0 1 0
0 0 1




S


YA,t
YB,t
YC,t


Bt
yt = SBt
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 30
Yt : observed aggregate of all
series at time t.
YX,t : observation on series X at
time t.
Bt : vector of all series at
bottom level in time t.
Hierarchical data
Total
A
AX AY AZ
B
BX BY BZ
C
CX CY CZ
yt =












Yt
YA,t
YB,t
YC,t
YAX,t
YAY,t
YAZ,t
YBX,t
YBY,t
YBZ,t
YCX,t
YCY,t
YCZ,t












=












1 1 1 1 1 1 1 1 1
1 1 1 0 0 0 0 0 0
0 0 0 1 1 1 0 0 0
0 0 0 0 0 0 1 1 1
1 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0
0 0 0 0 1 0 0 0 0
0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 1












S







YAX,t
YAY,t
YAZ,t
YBX,t
YBY,t
YBZ,t
YCX,t
YCY,t
YCZ,t







Bt
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 31
Hierarchical data
Total
A
AX AY AZ
B
BX BY BZ
C
CX CY CZ
yt =












Yt
YA,t
YB,t
YC,t
YAX,t
YAY,t
YAZ,t
YBX,t
YBY,t
YBZ,t
YCX,t
YCY,t
YCZ,t












=












1 1 1 1 1 1 1 1 1
1 1 1 0 0 0 0 0 0
0 0 0 1 1 1 0 0 0
0 0 0 0 0 0 1 1 1
1 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0
0 0 0 0 1 0 0 0 0
0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 1












S







YAX,t
YAY,t
YAZ,t
YBX,t
YBY,t
YBZ,t
YCX,t
YCY,t
YCZ,t







Bt
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 31
Hierarchical data
Total
A
AX AY AZ
B
BX BY BZ
C
CX CY CZ
yt =












Yt
YA,t
YB,t
YC,t
YAX,t
YAY,t
YAZ,t
YBX,t
YBY,t
YBZ,t
YCX,t
YCY,t
YCZ,t












=












1 1 1 1 1 1 1 1 1
1 1 1 0 0 0 0 0 0
0 0 0 1 1 1 0 0 0
0 0 0 0 0 0 1 1 1
1 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0
0 0 0 0 1 0 0 0 0
0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 1












S







YAX,t
YAY,t
YAZ,t
YBX,t
YBY,t
YBZ,t
YCX,t
YCY,t
YCZ,t







Bt
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 31
yt = SBt
Grouped data
AX AY A
BX BY B
X Y Total
yt =













Yt
YA,t
YB,t
YX,t
YY,t
YAX,t
YAY,t
YBX,t
YBY,t













=













1 1 1 1
1 1 0 0
0 0 1 1
1 0 1 0
0 1 0 1
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1













S



YAX,t
YAY,t
YBX,t
YBY,t



Bt
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 32
Grouped data
AX AY A
BX BY B
X Y Total
yt =













Yt
YA,t
YB,t
YX,t
YY,t
YAX,t
YAY,t
YBX,t
YBY,t













=













1 1 1 1
1 1 0 0
0 0 1 1
1 0 1 0
0 1 0 1
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1













S



YAX,t
YAY,t
YBX,t
YBY,t



Bt
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 32
Grouped data
AX AY A
BX BY B
X Y Total
yt =













Yt
YA,t
YB,t
YX,t
YY,t
YAX,t
YAY,t
YBX,t
YBY,t













=













1 1 1 1
1 1 0 0
0 0 1 1
1 0 1 0
0 1 0 1
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1













S



YAX,t
YAY,t
YBX,t
YBY,t



Bt
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 32
yt = SBt
Forecasting notation
Let ˆyn(h) be vector of initial h-step forecasts,
made at time n, stacked in same order as yt.
(They may not add up.)
Hierarchical forecasting methods of the form:
˜yn(h) = SPˆyn(h)
for some matrix P.
P extracts and combines base forecasts
ˆyn(h) to get bottom-level forecasts.
S adds them up
Revised reconciled forecasts: ˜yn(h).
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 33
Forecasting notation
Let ˆyn(h) be vector of initial h-step forecasts,
made at time n, stacked in same order as yt.
(They may not add up.)
Hierarchical forecasting methods of the form:
˜yn(h) = SPˆyn(h)
for some matrix P.
P extracts and combines base forecasts
ˆyn(h) to get bottom-level forecasts.
S adds them up
Revised reconciled forecasts: ˜yn(h).
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 33
Forecasting notation
Let ˆyn(h) be vector of initial h-step forecasts,
made at time n, stacked in same order as yt.
(They may not add up.)
Hierarchical forecasting methods of the form:
˜yn(h) = SPˆyn(h)
for some matrix P.
P extracts and combines base forecasts
ˆyn(h) to get bottom-level forecasts.
S adds them up
Revised reconciled forecasts: ˜yn(h).
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 33
Forecasting notation
Let ˆyn(h) be vector of initial h-step forecasts,
made at time n, stacked in same order as yt.
(They may not add up.)
Hierarchical forecasting methods of the form:
˜yn(h) = SPˆyn(h)
for some matrix P.
P extracts and combines base forecasts
ˆyn(h) to get bottom-level forecasts.
S adds them up
Revised reconciled forecasts: ˜yn(h).
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 33
Forecasting notation
Let ˆyn(h) be vector of initial h-step forecasts,
made at time n, stacked in same order as yt.
(They may not add up.)
Hierarchical forecasting methods of the form:
˜yn(h) = SPˆyn(h)
for some matrix P.
P extracts and combines base forecasts
ˆyn(h) to get bottom-level forecasts.
S adds them up
Revised reconciled forecasts: ˜yn(h).
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 33
Forecasting notation
Let ˆyn(h) be vector of initial h-step forecasts,
made at time n, stacked in same order as yt.
(They may not add up.)
Hierarchical forecasting methods of the form:
˜yn(h) = SPˆyn(h)
for some matrix P.
P extracts and combines base forecasts
ˆyn(h) to get bottom-level forecasts.
S adds them up
Revised reconciled forecasts: ˜yn(h).
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 33
Bottom-up forecasts
˜yn(h) = SPˆyn(h)
Bottom-up forecasts are obtained using
P = [0 | I] ,
where 0 is null matrix and I is identity matrix.
P matrix extracts only bottom-level
forecasts from ˆyn(h)
S adds them up to give the bottom-up
forecasts.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 34
Bottom-up forecasts
˜yn(h) = SPˆyn(h)
Bottom-up forecasts are obtained using
P = [0 | I] ,
where 0 is null matrix and I is identity matrix.
P matrix extracts only bottom-level
forecasts from ˆyn(h)
S adds them up to give the bottom-up
forecasts.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 34
Bottom-up forecasts
˜yn(h) = SPˆyn(h)
Bottom-up forecasts are obtained using
P = [0 | I] ,
where 0 is null matrix and I is identity matrix.
P matrix extracts only bottom-level
forecasts from ˆyn(h)
S adds them up to give the bottom-up
forecasts.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 34
Top-down forecasts
˜yn(h) = SPˆyn(h)
Top-down forecasts are obtained using
P = [p | 0]
where p = [p1, p2, . . . , pmK
] is a vector of
proportions that sum to one.
P distributes forecasts of the aggregate to
the lowest level series.
Different methods of top-down forecasting
lead to different proportionality vectors p.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 35
Top-down forecasts
˜yn(h) = SPˆyn(h)
Top-down forecasts are obtained using
P = [p | 0]
where p = [p1, p2, . . . , pmK
] is a vector of
proportions that sum to one.
P distributes forecasts of the aggregate to
the lowest level series.
Different methods of top-down forecasting
lead to different proportionality vectors p.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 35
Top-down forecasts
˜yn(h) = SPˆyn(h)
Top-down forecasts are obtained using
P = [p | 0]
where p = [p1, p2, . . . , pmK
] is a vector of
proportions that sum to one.
P distributes forecasts of the aggregate to
the lowest level series.
Different methods of top-down forecasting
lead to different proportionality vectors p.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 35
General properties: bias
˜yn(h) = SPˆyn(h)
Assume: base forecasts ˆyn(h) are unbiased:
E[ˆyn(h)|y1, . . . , yn] = E[yn+h|y1, . . . , yn]
Let ˆBn(h) be bottom level base forecasts
with βn(h) = E[ˆBn(h)|y1, . . . , yn].
Then E[ˆyn(h)] = Sβn(h).
We want the revised forecasts to be unbiased:
E[˜yn(h)] = SPSβn(h) = Sβn(h).
Result will hold provided SPS = S.
True for bottom-up, but not for any top-down
method or middle-out method.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 36
General properties: bias
˜yn(h) = SPˆyn(h)
Assume: base forecasts ˆyn(h) are unbiased:
E[ˆyn(h)|y1, . . . , yn] = E[yn+h|y1, . . . , yn]
Let ˆBn(h) be bottom level base forecasts
with βn(h) = E[ˆBn(h)|y1, . . . , yn].
Then E[ˆyn(h)] = Sβn(h).
We want the revised forecasts to be unbiased:
E[˜yn(h)] = SPSβn(h) = Sβn(h).
Result will hold provided SPS = S.
True for bottom-up, but not for any top-down
method or middle-out method.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 36
General properties: bias
˜yn(h) = SPˆyn(h)
Assume: base forecasts ˆyn(h) are unbiased:
E[ˆyn(h)|y1, . . . , yn] = E[yn+h|y1, . . . , yn]
Let ˆBn(h) be bottom level base forecasts
with βn(h) = E[ˆBn(h)|y1, . . . , yn].
Then E[ˆyn(h)] = Sβn(h).
We want the revised forecasts to be unbiased:
E[˜yn(h)] = SPSβn(h) = Sβn(h).
Result will hold provided SPS = S.
True for bottom-up, but not for any top-down
method or middle-out method.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 36
General properties: bias
˜yn(h) = SPˆyn(h)
Assume: base forecasts ˆyn(h) are unbiased:
E[ˆyn(h)|y1, . . . , yn] = E[yn+h|y1, . . . , yn]
Let ˆBn(h) be bottom level base forecasts
with βn(h) = E[ˆBn(h)|y1, . . . , yn].
Then E[ˆyn(h)] = Sβn(h).
We want the revised forecasts to be unbiased:
E[˜yn(h)] = SPSβn(h) = Sβn(h).
Result will hold provided SPS = S.
True for bottom-up, but not for any top-down
method or middle-out method.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 36
General properties: bias
˜yn(h) = SPˆyn(h)
Assume: base forecasts ˆyn(h) are unbiased:
E[ˆyn(h)|y1, . . . , yn] = E[yn+h|y1, . . . , yn]
Let ˆBn(h) be bottom level base forecasts
with βn(h) = E[ˆBn(h)|y1, . . . , yn].
Then E[ˆyn(h)] = Sβn(h).
We want the revised forecasts to be unbiased:
E[˜yn(h)] = SPSβn(h) = Sβn(h).
Result will hold provided SPS = S.
True for bottom-up, but not for any top-down
method or middle-out method.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 36
General properties: bias
˜yn(h) = SPˆyn(h)
Assume: base forecasts ˆyn(h) are unbiased:
E[ˆyn(h)|y1, . . . , yn] = E[yn+h|y1, . . . , yn]
Let ˆBn(h) be bottom level base forecasts
with βn(h) = E[ˆBn(h)|y1, . . . , yn].
Then E[ˆyn(h)] = Sβn(h).
We want the revised forecasts to be unbiased:
E[˜yn(h)] = SPSβn(h) = Sβn(h).
Result will hold provided SPS = S.
True for bottom-up, but not for any top-down
method or middle-out method.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 36
General properties: bias
˜yn(h) = SPˆyn(h)
Assume: base forecasts ˆyn(h) are unbiased:
E[ˆyn(h)|y1, . . . , yn] = E[yn+h|y1, . . . , yn]
Let ˆBn(h) be bottom level base forecasts
with βn(h) = E[ˆBn(h)|y1, . . . , yn].
Then E[ˆyn(h)] = Sβn(h).
We want the revised forecasts to be unbiased:
E[˜yn(h)] = SPSβn(h) = Sβn(h).
Result will hold provided SPS = S.
True for bottom-up, but not for any top-down
method or middle-out method.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 36
General properties: bias
˜yn(h) = SPˆyn(h)
Assume: base forecasts ˆyn(h) are unbiased:
E[ˆyn(h)|y1, . . . , yn] = E[yn+h|y1, . . . , yn]
Let ˆBn(h) be bottom level base forecasts
with βn(h) = E[ˆBn(h)|y1, . . . , yn].
Then E[ˆyn(h)] = Sβn(h).
We want the revised forecasts to be unbiased:
E[˜yn(h)] = SPSβn(h) = Sβn(h).
Result will hold provided SPS = S.
True for bottom-up, but not for any top-down
method or middle-out method.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 36
General properties: variance
˜yn(h) = SPˆyn(h)
Let variance of base forecasts ˆyn(h) be given
by
Σh = Var[ˆyn(h)|y1, . . . , yn]
Then the variance of the revised forecasts is
given by
Var[˜yn(h)|y1, . . . , yn] = SPΣhP S .
This is a general result for all existing methods.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 37
General properties: variance
˜yn(h) = SPˆyn(h)
Let variance of base forecasts ˆyn(h) be given
by
Σh = Var[ˆyn(h)|y1, . . . , yn]
Then the variance of the revised forecasts is
given by
Var[˜yn(h)|y1, . . . , yn] = SPΣhP S .
This is a general result for all existing methods.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 37
General properties: variance
˜yn(h) = SPˆyn(h)
Let variance of base forecasts ˆyn(h) be given
by
Σh = Var[ˆyn(h)|y1, . . . , yn]
Then the variance of the revised forecasts is
given by
Var[˜yn(h)|y1, . . . , yn] = SPΣhP S .
This is a general result for all existing methods.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 37
BLUF via trace minimization
Theorem
For any P satisfying SPS = S, then
min
P
= trace[SPΣhP S ]
has solution
P = (S Σ†
hS)−1
S Σ†
h.
Σ†
h is generalized inverse of Σh.
Equivalent to GLS estimate of regression
ˆyn(h) = Sβn(h) + εh where ε ∼ N(0, Σh).
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 38
BLUF via trace minimization
Theorem
For any P satisfying SPS = S, then
min
P
= trace[SPΣhP S ]
has solution
P = (S Σ†
hS)−1
S Σ†
h.
Σ†
h is generalized inverse of Σh.
Equivalent to GLS estimate of regression
ˆyn(h) = Sβn(h) + εh where ε ∼ N(0, Σh).
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 38
BLUF via trace minimization
Theorem
For any P satisfying SPS = S, then
min
P
= trace[SPΣhP S ]
has solution
P = (S Σ†
hS)−1
S Σ†
h.
Σ†
h is generalized inverse of Σh.
Equivalent to GLS estimate of regression
ˆyn(h) = Sβn(h) + εh where ε ∼ N(0, Σh).
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 38
Optimal combination forecasts
˜yn(h) = SPˆyn(h) = S(S Σ†
hS)−1
S Σ†
hˆyn(h)
Σ†
h is generalized inverse of Σh.
Var[˜yn(h)|y1, . . . , yn] = S(S Σ†
hS)−1
S
Problem: Σh hard to estimate.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 39
Optimal combination forecasts
˜yn(h) = SPˆyn(h) = S(S Σ†
hS)−1
S Σ†
hˆyn(h)
Initial forecasts
Σ†
h is generalized inverse of Σh.
Var[˜yn(h)|y1, . . . , yn] = S(S Σ†
hS)−1
S
Problem: Σh hard to estimate.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 39
Optimal combination forecasts
˜yn(h) = SPˆyn(h) = S(S Σ†
hS)−1
S Σ†
hˆyn(h)
Revised forecasts Initial forecasts
Σ†
h is generalized inverse of Σh.
Var[˜yn(h)|y1, . . . , yn] = S(S Σ†
hS)−1
S
Problem: Σh hard to estimate.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 39
Optimal combination forecasts
˜yn(h) = SPˆyn(h) = S(S Σ†
hS)−1
S Σ†
hˆyn(h)
Revised forecasts Initial forecasts
Σ†
h is generalized inverse of Σh.
Var[˜yn(h)|y1, . . . , yn] = S(S Σ†
hS)−1
S
Problem: Σh hard to estimate.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 39
Optimal combination forecasts
˜yn(h) = SPˆyn(h) = S(S Σ†
hS)−1
S Σ†
hˆyn(h)
Revised forecasts Initial forecasts
Σ†
h is generalized inverse of Σh.
Var[˜yn(h)|y1, . . . , yn] = S(S Σ†
hS)−1
S
Problem: Σh hard to estimate.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 39
Optimal combination forecasts
˜yn(h) = SPˆyn(h) = S(S Σ†
hS)−1
S Σ†
hˆyn(h)
Revised forecasts Initial forecasts
Σ†
h is generalized inverse of Σh.
Var[˜yn(h)|y1, . . . , yn] = S(S Σ†
hS)−1
S
Problem: Σh hard to estimate.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 39
Optimal combination forecasts
˜yn(h) = SPˆyn(h) = S(S Σ†
hS)−1
S Σ†
hˆyn(h)
Revised forecasts Initial forecasts
Σ†
h is generalized inverse of Σh.
Var[˜yn(h)|y1, . . . , yn] = S(S Σ†
hS)−1
S
Problem: Σh hard to estimate.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 39
Optimal combination forecasts
˜yn(h) = S(S Σ†
hS)−1
S Σ†
hˆyn(h)
Revised forecasts Base forecasts
Solution 1: OLS
Assume εh ≈ SεB,h where εB,h is the
forecast error at bottom level.
Then Σh ≈ SΩhS where Ωh = Var(εB,h).
If Moore-Penrose generalized inverse used,
then (S Σ†
hS)−1
S Σ†
h = (S S)−1
S .
˜yn(h) = S(S S)−1
S ˆyn(h)
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 40
Optimal combination forecasts
˜yn(h) = S(S Σ†
hS)−1
S Σ†
hˆyn(h)
Revised forecasts Base forecasts
Solution 1: OLS
Assume εh ≈ SεB,h where εB,h is the
forecast error at bottom level.
Then Σh ≈ SΩhS where Ωh = Var(εB,h).
If Moore-Penrose generalized inverse used,
then (S Σ†
hS)−1
S Σ†
h = (S S)−1
S .
˜yn(h) = S(S S)−1
S ˆyn(h)
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 40
Optimal combination forecasts
˜yn(h) = S(S Σ†
hS)−1
S Σ†
hˆyn(h)
Revised forecasts Base forecasts
Solution 1: OLS
Assume εh ≈ SεB,h where εB,h is the
forecast error at bottom level.
Then Σh ≈ SΩhS where Ωh = Var(εB,h).
If Moore-Penrose generalized inverse used,
then (S Σ†
hS)−1
S Σ†
h = (S S)−1
S .
˜yn(h) = S(S S)−1
S ˆyn(h)
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 40
Optimal combination forecasts
˜yn(h) = S(S Σ†
hS)−1
S Σ†
hˆyn(h)
Revised forecasts Base forecasts
Solution 1: OLS
Assume εh ≈ SεB,h where εB,h is the
forecast error at bottom level.
Then Σh ≈ SΩhS where Ωh = Var(εB,h).
If Moore-Penrose generalized inverse used,
then (S Σ†
hS)−1
S Σ†
h = (S S)−1
S .
˜yn(h) = S(S S)−1
S ˆyn(h)
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 40
Optimal combination forecasts
˜yn(h) = S(S Σ†
hS)−1
S Σ†
hˆyn(h)
Revised forecasts Base forecasts
Solution 1: OLS
Assume εh ≈ SεB,h where εB,h is the
forecast error at bottom level.
Then Σh ≈ SΩhS where Ωh = Var(εB,h).
If Moore-Penrose generalized inverse used,
then (S Σ†
hS)−1
S Σ†
h = (S S)−1
S .
˜yn(h) = S(S S)−1
S ˆyn(h)
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 40
Optimal combination forecasts
˜yn(h) = S(S Σ†
hS)−1
S Σ†
hˆyn(h)
Revised forecasts Base forecasts
Solution 1: OLS
Assume εh ≈ SεB,h where εB,h is the
forecast error at bottom level.
Then Σh ≈ SΩhS where Ωh = Var(εB,h).
If Moore-Penrose generalized inverse used,
then (S Σ†
hS)−1
S Σ†
h = (S S)−1
S .
˜yn(h) = S(S S)−1
S ˆyn(h)
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 40
Optimal combination forecasts
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 41
˜yn(h) = S(S S)−1
S ˆyn(h)Total
A B C
Optimal combination forecasts
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 41
˜yn(h) = S(S S)−1
S ˆyn(h)Total
A B C
Weights:
S(S S)−1
S =




0.75 0.25 0.25 0.25
0.25 0.75 −0.25 −0.25
0.25 −0.25 0.75 −0.25
0.25 −0.25 −0.25 0.75




Optimal combination forecasts
Total
A
AA AB AC
B
BA BB BC
C
CA CB CC
Weights: S(S S)−1
S =






















0.69 0.23 0.23 0.23 0.08 0.08 0.08 0.08 0.08 0.08 0.08 0.08 0.08
0.23 0.58 −0.17 −0.17 0.19 0.19 0.19 −0.06 −0.06 −0.06 −0.06 −0.06 −0.06
0.23 −0.17 0.58 −0.17 −0.06 −0.06 −0.06 0.19 0.19 0.19 −0.06 −0.06 −0.06
0.23 −0.17 −0.17 0.58 −0.06 −0.06 −0.06 −0.06 −0.06 −0.06 0.19 0.19 0.19
0.08 0.19 −0.06 −0.06 0.73 −0.27 −0.27 −0.02 −0.02 −0.02 −0.02 −0.02 −0.02
0.08 0.19 −0.06 −0.06 −0.27 0.73 −0.27 −0.02 −0.02 −0.02 −0.02 −0.02 −0.02
0.08 0.19 −0.06 −0.06 −0.27 −0.27 0.73 −0.02 −0.02 −0.02 −0.02 −0.02 −0.02
0.08 −0.06 0.19 −0.06 −0.02 −0.02 −0.02 0.73 −0.27 −0.27 −0.02 −0.02 −0.02
0.08 −0.06 0.19 −0.06 −0.02 −0.02 −0.02 −0.27 0.73 −0.27 −0.02 −0.02 −0.02
0.08 −0.06 0.19 −0.06 −0.02 −0.02 −0.02 −0.27 −0.27 0.73 −0.02 −0.02 −0.02
0.08 −0.06 −0.06 0.19 −0.02 −0.02 −0.02 −0.02 −0.02 −0.02 0.73 −0.27 −0.27
0.08 −0.06 −0.06 0.19 −0.02 −0.02 −0.02 −0.02 −0.02 −0.02 −0.27 0.73 −0.27
0.08 −0.06 −0.06 0.19 −0.02 −0.02 −0.02 −0.02 −0.02 −0.02 −0.27 −0.27 0.73






















Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 42
Optimal combination forecasts
Total
A
AA AB AC
B
BA BB BC
C
CA CB CC
Weights: S(S S)−1
S =






















0.69 0.23 0.23 0.23 0.08 0.08 0.08 0.08 0.08 0.08 0.08 0.08 0.08
0.23 0.58 −0.17 −0.17 0.19 0.19 0.19 −0.06 −0.06 −0.06 −0.06 −0.06 −0.06
0.23 −0.17 0.58 −0.17 −0.06 −0.06 −0.06 0.19 0.19 0.19 −0.06 −0.06 −0.06
0.23 −0.17 −0.17 0.58 −0.06 −0.06 −0.06 −0.06 −0.06 −0.06 0.19 0.19 0.19
0.08 0.19 −0.06 −0.06 0.73 −0.27 −0.27 −0.02 −0.02 −0.02 −0.02 −0.02 −0.02
0.08 0.19 −0.06 −0.06 −0.27 0.73 −0.27 −0.02 −0.02 −0.02 −0.02 −0.02 −0.02
0.08 0.19 −0.06 −0.06 −0.27 −0.27 0.73 −0.02 −0.02 −0.02 −0.02 −0.02 −0.02
0.08 −0.06 0.19 −0.06 −0.02 −0.02 −0.02 0.73 −0.27 −0.27 −0.02 −0.02 −0.02
0.08 −0.06 0.19 −0.06 −0.02 −0.02 −0.02 −0.27 0.73 −0.27 −0.02 −0.02 −0.02
0.08 −0.06 0.19 −0.06 −0.02 −0.02 −0.02 −0.27 −0.27 0.73 −0.02 −0.02 −0.02
0.08 −0.06 −0.06 0.19 −0.02 −0.02 −0.02 −0.02 −0.02 −0.02 0.73 −0.27 −0.27
0.08 −0.06 −0.06 0.19 −0.02 −0.02 −0.02 −0.02 −0.02 −0.02 −0.27 0.73 −0.27
0.08 −0.06 −0.06 0.19 −0.02 −0.02 −0.02 −0.02 −0.02 −0.02 −0.27 −0.27 0.73






















Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 42
Features
Covariates can be included in initial forecasts.
Adjustments can be made to initial forecasts
at any level.
Very simple and flexible method. Can work
with any hierarchical or grouped time series.
SPS = S so reconciled forcasts are unbiased.
Conceptually easy to implement: OLS on
base forecasts.
Weights are independent of the data and of
the covariance structure of the hierarchy.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 43
Features
Covariates can be included in initial forecasts.
Adjustments can be made to initial forecasts
at any level.
Very simple and flexible method. Can work
with any hierarchical or grouped time series.
SPS = S so reconciled forcasts are unbiased.
Conceptually easy to implement: OLS on
base forecasts.
Weights are independent of the data and of
the covariance structure of the hierarchy.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 43
Features
Covariates can be included in initial forecasts.
Adjustments can be made to initial forecasts
at any level.
Very simple and flexible method. Can work
with any hierarchical or grouped time series.
SPS = S so reconciled forcasts are unbiased.
Conceptually easy to implement: OLS on
base forecasts.
Weights are independent of the data and of
the covariance structure of the hierarchy.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 43
Features
Covariates can be included in initial forecasts.
Adjustments can be made to initial forecasts
at any level.
Very simple and flexible method. Can work
with any hierarchical or grouped time series.
SPS = S so reconciled forcasts are unbiased.
Conceptually easy to implement: OLS on
base forecasts.
Weights are independent of the data and of
the covariance structure of the hierarchy.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 43
Features
Covariates can be included in initial forecasts.
Adjustments can be made to initial forecasts
at any level.
Very simple and flexible method. Can work
with any hierarchical or grouped time series.
SPS = S so reconciled forcasts are unbiased.
Conceptually easy to implement: OLS on
base forecasts.
Weights are independent of the data and of
the covariance structure of the hierarchy.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 43
Features
Covariates can be included in initial forecasts.
Adjustments can be made to initial forecasts
at any level.
Very simple and flexible method. Can work
with any hierarchical or grouped time series.
SPS = S so reconciled forcasts are unbiased.
Conceptually easy to implement: OLS on
base forecasts.
Weights are independent of the data and of
the covariance structure of the hierarchy.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 43
Challenges
Computational difficulties in big
hierarchies due to size of the S matrix and
singular behavior of (S S).
Need to estimate covariance matrix to
produce prediction intervals.
Ignores covariance matrix in computing
point forecasts.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 44
˜yn(h) = S(S S)−1
S ˆyn(h)
Challenges
Computational difficulties in big
hierarchies due to size of the S matrix and
singular behavior of (S S).
Need to estimate covariance matrix to
produce prediction intervals.
Ignores covariance matrix in computing
point forecasts.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 44
˜yn(h) = S(S S)−1
S ˆyn(h)
Challenges
Computational difficulties in big
hierarchies due to size of the S matrix and
singular behavior of (S S).
Need to estimate covariance matrix to
produce prediction intervals.
Ignores covariance matrix in computing
point forecasts.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 44
˜yn(h) = S(S S)−1
S ˆyn(h)
Optimal combination forecasts
Solution 1: OLS
Approximate Σ†
1 by cI.
Solution 2: Rescaling
Suppose we approximate Σ1 by its
diagonal.
Let Λ = diagonal Σ1
−1
contain inverse
one-step forecast variances.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 45
˜yn(h) = S(S Σ†
1S)−1
S Σ†
1ˆyn(h)
˜yn(h) = S(SΛS)−1
SΛˆyn(h)
Optimal combination forecasts
Solution 1: OLS
Approximate Σ†
1 by cI.
Solution 2: Rescaling
Suppose we approximate Σ1 by its
diagonal.
Let Λ = diagonal Σ1
−1
contain inverse
one-step forecast variances.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 45
˜yn(h) = S(S Σ†
1S)−1
S Σ†
1ˆyn(h)
˜yn(h) = S(SΛS)−1
SΛˆyn(h)
Optimal combination forecasts
Solution 1: OLS
Approximate Σ†
1 by cI.
Solution 2: Rescaling
Suppose we approximate Σ1 by its
diagonal.
Let Λ = diagonal Σ1
−1
contain inverse
one-step forecast variances.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 45
˜yn(h) = S(S Σ†
1S)−1
S Σ†
1ˆyn(h)
˜yn(h) = S(SΛS)−1
SΛˆyn(h)
Optimal combination forecasts
Solution 1: OLS
Approximate Σ†
1 by cI.
Solution 2: Rescaling
Suppose we approximate Σ1 by its
diagonal.
Let Λ = diagonal Σ1
−1
contain inverse
one-step forecast variances.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 45
˜yn(h) = S(S Σ†
1S)−1
S Σ†
1ˆyn(h)
˜yn(h) = S(SΛS)−1
SΛˆyn(h)
Optimal combination forecasts
Solution 1: OLS
Approximate Σ†
1 by cI.
Solution 2: Rescaling
Suppose we approximate Σ1 by its
diagonal.
Let Λ = diagonal Σ1
−1
contain inverse
one-step forecast variances.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 45
˜yn(h) = S(S Σ†
1S)−1
S Σ†
1ˆyn(h)
˜yn(h) = S(SΛS)−1
SΛˆyn(h)
Optimal reconciled forecasts
˜yn(h) = S ˆβn(h) = S(S ΛS)−1
S Λˆyn(h)
Easy to estimate, and places weight where
we have best forecasts.
Ignores covariances.
For large numbers of time series, we need
to do calculation without explicitly forming
S or (SΛS)−1
or SΛ.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 46
Optimal reconciled forecasts
˜yn(h) = S ˆβn(h) = S(S ΛS)−1
S Λˆyn(h)
Initial forecasts
Easy to estimate, and places weight where
we have best forecasts.
Ignores covariances.
For large numbers of time series, we need
to do calculation without explicitly forming
S or (SΛS)−1
or SΛ.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 46
Optimal reconciled forecasts
˜yn(h) = S ˆβn(h) = S(S ΛS)−1
S Λˆyn(h)
Revised forecasts Initial forecasts
Easy to estimate, and places weight where
we have best forecasts.
Ignores covariances.
For large numbers of time series, we need
to do calculation without explicitly forming
S or (SΛS)−1
or SΛ.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 46
Optimal reconciled forecasts
˜yn(h) = S ˆβn(h) = S(S ΛS)−1
S Λˆyn(h)
Revised forecasts Initial forecasts
Easy to estimate, and places weight where
we have best forecasts.
Ignores covariances.
For large numbers of time series, we need
to do calculation without explicitly forming
S or (SΛS)−1
or SΛ.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 46
Optimal reconciled forecasts
˜yn(h) = S ˆβn(h) = S(S ΛS)−1
S Λˆyn(h)
Revised forecasts Initial forecasts
Easy to estimate, and places weight where
we have best forecasts.
Ignores covariances.
For large numbers of time series, we need
to do calculation without explicitly forming
S or (SΛS)−1
or SΛ.
Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 46
Outline
1 Examples of big time series
2 Time series visualisation
3 BLUF: Best Linear Unbiased Forecasts
4 Application: Australian tourism
5 Application: Australian labour market
6 Fast computation tricks
7 hts package for R
8 References
Visualising and forecasting big time series data Application: Australian tourism 47
Australian tourism
Visualising and forecasting big time series data Application: Australian tourism 48
Australian tourism
Visualising and forecasting big time series data Application: Australian tourism 48
Hierarchy:
States (7)
Zones (27)
Regions (82)
Australian tourism
Visualising and forecasting big time series data Application: Australian tourism 48
Hierarchy:
States (7)
Zones (27)
Regions (82)
Base forecasts
ETS (exponential
smoothing) models
Base forecasts
Visualising and forecasting big time series data Application: Australian tourism 49
Domestic tourism forecasts: Total
Year
Visitornights
1998 2000 2002 2004 2006 2008
600006500070000750008000085000
Base forecasts
Visualising and forecasting big time series data Application: Australian tourism 49
Domestic tourism forecasts: NSW
Year
Visitornights
1998 2000 2002 2004 2006 2008
18000220002600030000
Base forecasts
Visualising and forecasting big time series data Application: Australian tourism 49
Domestic tourism forecasts: VIC
Year
Visitornights
1998 2000 2002 2004 2006 2008
1000012000140001600018000
Base forecasts
Visualising and forecasting big time series data Application: Australian tourism 49
Domestic tourism forecasts: Nth.Coast.NSW
Year
Visitornights
1998 2000 2002 2004 2006 2008
50006000700080009000
Base forecasts
Visualising and forecasting big time series data Application: Australian tourism 49
Domestic tourism forecasts: Metro.QLD
Year
Visitornights
1998 2000 2002 2004 2006 2008
800090001100013000
Base forecasts
Visualising and forecasting big time series data Application: Australian tourism 49
Domestic tourism forecasts: Sth.WA
Year
Visitornights
1998 2000 2002 2004 2006 2008
400600800100012001400
Base forecasts
Visualising and forecasting big time series data Application: Australian tourism 49
Domestic tourism forecasts: X201.Melbourne
Year
Visitornights
1998 2000 2002 2004 2006 2008
40004500500055006000
Base forecasts
Visualising and forecasting big time series data Application: Australian tourism 49
Domestic tourism forecasts: X402.Murraylands
Year
Visitornights
1998 2000 2002 2004 2006 2008
0100200300
Base forecasts
Visualising and forecasting big time series data Application: Australian tourism 49
Domestic tourism forecasts: X809.Daly
Year
Visitornights
1998 2000 2002 2004 2006 2008
020406080100
Reconciled forecasts
Visualising and forecasting big time series data Application: Australian tourism 50
Total
2000 2005 2010
650008000095000
Reconciled forecasts
Visualising and forecasting big time series data Application: Australian tourism 50
NSW
2000 2005 2010
180002400030000
VIC
2000 2005 2010
100001400018000
QLD
2000 2005 2010
1400020000
Other 2000 2005 2010
1800024000
Reconciled forecasts
Visualising and forecasting big time series data Application: Australian tourism 50
Sydney
2000 2005 2010
40007000
OtherNSW
2000 2005 2010
1400022000
Melbourne
2000 2005 2010
40005000
OtherVIC
2000 2005 2010
600012000
GCandBrisbane
2000 2005 2010
60009000
OtherQLD
2000 2005 2010
600012000
Capitalcities
2000 2005 2010
1400020000
Other
2000 2005 2010
55007500
Forecast evaluation
Select models using all observations;
Re-estimate models using first 12
observations and generate 1- to
8-step-ahead forecasts;
Increase sample size one observation at a
time, re-estimate models, generate
forecasts until the end of the sample;
In total 24 1-step-ahead, 23
2-steps-ahead, up to 17 8-steps-ahead for
forecast evaluation.
Visualising and forecasting big time series data Application: Australian tourism 51
Forecast evaluation
Select models using all observations;
Re-estimate models using first 12
observations and generate 1- to
8-step-ahead forecasts;
Increase sample size one observation at a
time, re-estimate models, generate
forecasts until the end of the sample;
In total 24 1-step-ahead, 23
2-steps-ahead, up to 17 8-steps-ahead for
forecast evaluation.
Visualising and forecasting big time series data Application: Australian tourism 51
Forecast evaluation
Select models using all observations;
Re-estimate models using first 12
observations and generate 1- to
8-step-ahead forecasts;
Increase sample size one observation at a
time, re-estimate models, generate
forecasts until the end of the sample;
In total 24 1-step-ahead, 23
2-steps-ahead, up to 17 8-steps-ahead for
forecast evaluation.
Visualising and forecasting big time series data Application: Australian tourism 51
Forecast evaluation
Select models using all observations;
Re-estimate models using first 12
observations and generate 1- to
8-step-ahead forecasts;
Increase sample size one observation at a
time, re-estimate models, generate
forecasts until the end of the sample;
In total 24 1-step-ahead, 23
2-steps-ahead, up to 17 8-steps-ahead for
forecast evaluation.
Visualising and forecasting big time series data Application: Australian tourism 51
Hierarchy: states, zones, regions
MAPE h = 1 h = 2 h = 4 h = 6 h = 8 Average
Top Level: Australia
Bottom-up 3.79 3.58 4.01 4.55 4.24 4.06
OLS 3.83 3.66 3.88 4.19 4.25 3.94
Scaling (st. dev.) 3.68 3.56 3.97 4.57 4.25 4.04
Level: States
Bottom-up 10.70 10.52 10.85 11.46 11.27 11.03
OLS 11.07 10.58 11.13 11.62 12.21 11.35
Scaling (st. dev.) 10.44 10.17 10.47 10.97 10.98 10.67
Level: Zones
Bottom-up 14.99 14.97 14.98 15.69 15.65 15.32
OLS 15.16 15.06 15.27 15.74 16.15 15.48
Scaling (st. dev.) 14.63 14.62 14.68 15.17 15.25 14.94
Bottom Level: Regions
Bottom-up 33.12 32.54 32.26 33.74 33.96 33.18
OLS 35.89 33.86 34.26 36.06 37.49 35.43
Scaling (st. dev.) 31.68 31.22 31.08 32.41 32.77 31.89
Visualising and forecasting big time series data Application: Australian tourism 52
Outline
1 Examples of big time series
2 Time series visualisation
3 BLUF: Best Linear Unbiased Forecasts
4 Application: Australian tourism
5 Application: Australian labour market
6 Fast computation tricks
7 hts package for R
8 References
Visualising and forecasting big time series data Application: Australian labour market 53
ANZSCO
Australia and New Zealand Standard
Classification of Occupations
8 major groups
43 sub-major groups
97 minor groups
– 359 unit groups
* 1023 occupations
Example: statistician
2 Professionals
22 Business, Human Resource and Marketing
Professionals
224 Information and Organisation Professionals
2241 Actuaries, Mathematicians and Statisticians
224113 Statistician
Visualising and forecasting big time series data Application: Australian labour market 54
ANZSCO
Australia and New Zealand Standard
Classification of Occupations
8 major groups
43 sub-major groups
97 minor groups
– 359 unit groups
* 1023 occupations
Example: statistician
2 Professionals
22 Business, Human Resource and Marketing
Professionals
224 Information and Organisation Professionals
2241 Actuaries, Mathematicians and Statisticians
224113 Statistician
Visualising and forecasting big time series data Application: Australian labour market 54
Australian Labour Market data
Visualising and forecasting big time series data Application: Australian labour market 55
Time
Level0
7000900011000
Time
Level1
5001000150020002500
1. Managers
2. Professionals
3. Technicians and trade workers
4. Community and personal services workers
5. Clerical and administrative workers
6. Sales workers
7. Machinery operators and drivers
8. Labourers
Time
Level2
100200300400500600700
Time
Level3
100200300400500600700
Time
Level4
1990 1995 2000 2005 2010
100200300400500
Australian Labour Market data
Visualising and forecasting big time series data Application: Australian labour market 55
Time
Level0
7000900011000
Time
Level1
5001000150020002500
1. Managers
2. Professionals
3. Technicians and trade workers
4. Community and personal services workers
5. Clerical and administrative workers
6. Sales workers
7. Machinery operators and drivers
8. Labourers
Time
Level2
100200300400500600700
Time
Level3
100200300400500600700
Time
Level4
1990 1995 2000 2005 2010
100200300400500
Lower three panels
show largest
sub-groups at each
level.
Australian Labour Market data
Visualising and forecasting big time series data Application: Australian labour market 55
Time
Level0
7000900011000
Time
Level1
5001000150020002500
1. Managers
2. Professionals
3. Technicians and trade workers
4. Community and personal services workers
5. Clerical and administrative workers
6. Sales workers
7. Machinery operators and drivers
8. Labourers
Time
Level2
100200300400500600700
Time
Level3
100200300400500600700
Time
Level4
1990 1995 2000 2005 2010
100200300400500
Time
Level0
10800112001160012000
Base forecasts
Reconciled forecasts
Time
Level1
680700720740760780800
Time
Level2
140150160170180190200
Time
Level3
140150160170180
Year
Level4
2010 2011 2012 2013 2014 2015
120130140150160
Australian Labour Market data
Visualising and forecasting big time series data Application: Australian labour market 55
Time
Level0
7000900011000
Time
Level1
5001000150020002500
1. Managers
2. Professionals
3. Technicians and trade workers
4. Community and personal services workers
5. Clerical and administrative workers
6. Sales workers
7. Machinery operators and drivers
8. Labourers
Time
Level2
100200300400500600700
Time
Level3
100200300400500600700
Time
Level4
1990 1995 2000 2005 2010
100200300400500
Time
Level0
10800112001160012000
Base forecasts
Reconciled forecasts
Time
Level1
680700720740760780800
Time
Level2
140150160170180190200
Time
Level3
140150160170180
Year
Level4
2010 2011 2012 2013 2014 2015
120130140150160
Base forecasts
from auto.arima()
Largest changes
shown for each
level
Forecast evaluation (rolling origin)
RMSE h = 1 h = 2 h = 3 h = 4 h = 5 h = 6 h = 7 h = 8 Average
Top level
Bottom-up 74.71 102.02 121.70 131.17 147.08 157.12 169.60 178.93 135.29
OLS 52.20 77.77 101.50 119.03 138.27 150.75 160.04 166.38 120.74
WLS 61.77 86.32 107.26 119.33 137.01 146.88 156.71 162.38 122.21
Level 1
Bottom-up 21.59 27.33 30.81 32.94 35.45 37.10 39.00 40.51 33.09
OLS 21.89 28.55 32.74 35.58 38.82 41.24 43.34 45.49 35.96
WLS 20.58 26.19 29.71 31.84 34.36 35.89 37.53 38.86 31.87
Level 2
Bottom-up 8.78 10.72 11.79 12.42 13.13 13.61 14.14 14.65 12.40
OLS 9.02 11.19 12.34 13.04 13.92 14.56 15.17 15.77 13.13
WLS 8.58 10.48 11.54 12.15 12.88 13.36 13.87 14.36 12.15
Level 3
Bottom-up 5.44 6.57 7.17 7.53 7.94 8.27 8.60 8.89 7.55
OLS 5.55 6.78 7.42 7.81 8.29 8.68 9.04 9.37 7.87
WLS 5.35 6.46 7.06 7.42 7.84 8.17 8.48 8.76 7.44
Bottom Level
Bottom-up 2.35 2.79 3.02 3.15 3.29 3.42 3.54 3.65 3.15
OLS 2.40 2.86 3.10 3.24 3.41 3.55 3.68 3.80 3.25
WLS 2.34 2.77 2.99 3.12 3.27 3.40 3.52 3.63 3.13
Visualising and forecasting big time series data Application: Australian labour market 56
Outline
1 Examples of big time series
2 Time series visualisation
3 BLUF: Best Linear Unbiased Forecasts
4 Application: Australian tourism
5 Application: Australian labour market
6 Fast computation tricks
7 hts package for R
8 References
Visualising and forecasting big time series data Fast computation tricks 57
Fast computation: hierarchical data
Total
A
AX AY AZ
B
BX BY BZ
C
CX CY CZ
yt =












Yt
YA,t
YB,t
YC,t
YAX,t
YAY,t
YAZ,t
YBX,t
YBY,t
YBZ,t
YCX,t
YCY,t
YCZ,t












=












1 1 1 1 1 1 1 1 1
1 1 1 0 0 0 0 0 0
0 0 0 1 1 1 0 0 0
0 0 0 0 0 0 1 1 1
1 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0
0 0 0 0 1 0 0 0 0
0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 1












S







YAX,t
YAY,t
YAZ,t
YBX,t
YBY,t
YBZ,t
YCX,t
YCY,t
YCZ,t







Bt
Visualising and forecasting big time series data Fast computation tricks 58
yt = SBt
Fast computation: hierarchical data
Total
A
AX AY AZ
B
BX BY BZ
C
CX CY CZ
yt =












Yt
YA,t
YAX,t
YAY,t
YAZ,t
YB,t
YBX,t
YBY,t
YBZ,t
YC,t
YCX,t
YCY,t
YCZ,t












=












1 1 1 1 1 1 1 1 1
1 1 1 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0 0
0 0 0 1 1 1 0 0 0
0 0 0 1 0 0 0 0 0
0 0 0 0 1 0 0 0 0
0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 1 1 1
0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 1












S







YAX,t
YAY,t
YAZ,t
YBX,t
YBY,t
YBZ,t
YCX,t
YCY,t
YCZ,t







Bt
Visualising and forecasting big time series data Fast computation tricks 59
yt = SBt
Fast computation: hierarchies
Think of the hierarchy as a tree of trees:
Total
T1 T2
. . . TK
Then the summing matrix contains k smaller summing
matrices:
S =






1n1
1n2
· · · 1nK
S1 0 · · · 0
0 S2 · · · 0
...
...
...
...
0 0 · · · SK






where 1n is an n-vector of ones and tree Ti has ni
terminal nodes.
Visualising and forecasting big time series data Fast computation tricks 60
Fast computation: hierarchies
Think of the hierarchy as a tree of trees:
Total
T1 T2
. . . TK
Then the summing matrix contains k smaller summing
matrices:
S =






1n1
1n2
· · · 1nK
S1 0 · · · 0
0 S2 · · · 0
...
...
...
...
0 0 · · · SK






where 1n is an n-vector of ones and tree Ti has ni
terminal nodes.
Visualising and forecasting big time series data Fast computation tricks 60
Fast computation: hierarchies
SΛS =




S1Λ1S1 0 · · · 0
0 S2Λ2S2 · · · 0
...
... ... ...
0 0 · · · SKΛKSK



+λ0 Jn
λ0 is the top left element of Λ;
Λk is a block of Λ, corresponding to tree Tk;
Jn is a matrix of ones;
n = k nk.
Now apply the Sherman-Morrison formula . . .
Visualising and forecasting big time series data Fast computation tricks 61
Fast computation: hierarchies
SΛS =




S1Λ1S1 0 · · · 0
0 S2Λ2S2 · · · 0
...
... ... ...
0 0 · · · SKΛKSK



+λ0 Jn
λ0 is the top left element of Λ;
Λk is a block of Λ, corresponding to tree Tk;
Jn is a matrix of ones;
n = k nk.
Now apply the Sherman-Morrison formula . . .
Visualising and forecasting big time series data Fast computation tricks 61
Fast computation: hierarchies
(SΛS)−1
=





(S1Λ1S1)−1
0 · · · 0
0 (S2Λ2S2)−1
· · · 0
...
...
...
...
0 0 · · · (SKΛKSK)−1





−cS0
S0 can be partitioned into K2
blocks, with the (k, )
block (of dimension nk × n ) being
(SkΛkSk)−1
Jnk,n (S Λ S )−1
Jnk,n is a nk × n matrix of ones.
c−1
= λ−1
0 +
k
1nk
(SkΛkSk)−1
1nk
.
Each SkΛkSk can be inverted similarly.
SΛy can also be computed recursively.
Visualising and forecasting big time series data Fast computation tricks 62
Fast computation: hierarchies
(SΛS)−1
=





(S1Λ1S1)−1
0 · · · 0
0 (S2Λ2S2)−1
· · · 0
...
...
...
...
0 0 · · · (SKΛKSK)−1





−cS0
S0 can be partitioned into K2
blocks, with the (k, )
block (of dimension nk × n ) being
(SkΛkSk)−1
Jnk,n (S Λ S )−1
Jnk,n is a nk × n matrix of ones.
c−1
= λ−1
0 +
k
1nk
(SkΛkSk)−1
1nk
.
Each SkΛkSk can be inverted similarly.
SΛy can also be computed recursively.
Visualising and forecasting big time series data Fast computation tricks 62
The recursive calculations can be
done in such a way that we never
store any of the large matrices
involved.
Fast computation
When the time series are not strictly
hierarchical and have more than two grouping
variables:
Use sparse matrix storage and arithmetic.
Use iterative approximation for inverting
large sparse matrices.
Paige & Saunders (1982)
ACM Trans. Math. Software
Visualising and forecasting big time series data Fast computation tricks 63
Fast computation
When the time series are not strictly
hierarchical and have more than two grouping
variables:
Use sparse matrix storage and arithmetic.
Use iterative approximation for inverting
large sparse matrices.
Paige & Saunders (1982)
ACM Trans. Math. Software
Visualising and forecasting big time series data Fast computation tricks 63
Fast computation
When the time series are not strictly
hierarchical and have more than two grouping
variables:
Use sparse matrix storage and arithmetic.
Use iterative approximation for inverting
large sparse matrices.
Paige & Saunders (1982)
ACM Trans. Math. Software
Visualising and forecasting big time series data Fast computation tricks 63
Outline
1 Examples of big time series
2 Time series visualisation
3 BLUF: Best Linear Unbiased Forecasts
4 Application: Australian tourism
5 Application: Australian labour market
6 Fast computation tricks
7 hts package for R
8 References
Visualising and forecasting big time series data hts package for R 64
hts package for R
Visualising and forecasting big time series data hts package for R 65
hts: Hierarchical and grouped time series
Methods for analysing and forecasting hierarchical and grouped
time series
Version: 4.3
Depends: forecast (≥ 5.0)
Imports: SparseM, parallel, utils
Published: 2014-06-10
Author: Rob J Hyndman, Earo Wang and Alan Lee
Maintainer: Rob J Hyndman <Rob.Hyndman at monash.edu>
BugReports: https://github.com/robjhyndman/hts/issues
License: GPL (≥ 2)
Example using R
library(hts)
# bts is a matrix containing the bottom level time series
# nodes describes the hierarchical structure
y <- hts(bts, nodes=list(2, c(3,2)))
Visualising and forecasting big time series data hts package for R 66
Example using R
library(hts)
# bts is a matrix containing the bottom level time series
# nodes describes the hierarchical structure
y <- hts(bts, nodes=list(2, c(3,2)))
Visualising and forecasting big time series data hts package for R 66
Total
A
AX AY AZ
B
BX BY
Example using R
library(hts)
# bts is a matrix containing the bottom level time series
# nodes describes the hierarchical structure
y <- hts(bts, nodes=list(2, c(3,2)))
# Forecast 10-step-ahead using WLS combination method
# ETS used for each series by default
fc <- forecast(y, h=10)
Visualising and forecasting big time series data hts package for R 67
forecast.gts function
Usage
forecast(object, h,
method = c("comb", "bu", "mo", "tdgsf", "tdgsa", "tdfp"),
fmethod = c("ets", "rw", "arima"),
weights = c("sd", "none", "nseries"),
positive = FALSE,
parallel = FALSE, num.cores = 2, ...)
Arguments
object Hierarchical time series object of class gts.
h Forecast horizon
method Method for distributing forecasts within the hierarchy.
fmethod Forecasting method to use
positive If TRUE, forecasts are forced to be strictly positive
weights Weights used for "optimal combination" method. When
weights = "sd", it takes account of the standard deviation of
forecasts.
parallel If TRUE, allow parallel processing
num.cores If parallel = TRUE, specify how many cores are going to be
used
Visualising and forecasting big time series data hts package for R 68
Outline
1 Examples of big time series
2 Time series visualisation
3 BLUF: Best Linear Unbiased Forecasts
4 Application: Australian tourism
5 Application: Australian labour market
6 Fast computation tricks
7 hts package for R
8 References
Visualising and forecasting big time series data References 69
References
RJ Hyndman, RA Ahmed, G Athanasopoulos, and
HL Shang (2011). “Optimal combination forecasts for
hierarchical time series”. Computational statistics &
data analysis 55(9), 2579–2589.
RJ Hyndman, AJ Lee, and E Wang (2014). Fast
computation of reconciled forecasts for hierarchical
and grouped time series. Working paper 17/14.
Department of Econometrics & Business Statistics,
Monash University
RJ Hyndman, AJ Lee, and E Wang (2014). hts:
Hierarchical and grouped time series.
cran.r-project.org/package=hts.
RJ Hyndman and G Athanasopoulos (2014).
Forecasting: principles and practice. OTexts.
OTexts.org/fpp/.
Visualising and forecasting big time series data References 70
References
RJ Hyndman, RA Ahmed, G Athanasopoulos, and
HL Shang (2011). “Optimal combination forecasts for
hierarchical time series”. Computational statistics &
data analysis 55(9), 2579–2589.
RJ Hyndman, AJ Lee, and E Wang (2014). Fast
computation of reconciled forecasts for hierarchical
and grouped time series. Working paper 17/14.
Department of Econometrics & Business Statistics,
Monash University
RJ Hyndman, AJ Lee, and E Wang (2014). hts:
Hierarchical and grouped time series.
cran.r-project.org/package=hts.
RJ Hyndman and G Athanasopoulos (2014).
Forecasting: principles and practice. OTexts.
OTexts.org/fpp/.
Visualising and forecasting big time series data References 70
¯ Papers and R code:
robjhyndman.com
¯ Email: Rob.Hyndman@monash.edu

Contenu connexe

En vedette

SimpleR: tips, tricks & tools
SimpleR: tips, tricks & toolsSimpleR: tips, tricks & tools
SimpleR: tips, tricks & toolsRob Hyndman
 
R tools for hierarchical time series
R tools for hierarchical time seriesR tools for hierarchical time series
R tools for hierarchical time seriesRob Hyndman
 
Coherent mortality forecasting using functional time series models
Coherent mortality forecasting using functional time series modelsCoherent mortality forecasting using functional time series models
Coherent mortality forecasting using functional time series modelsRob Hyndman
 
Automatic time series forecasting
Automatic time series forecastingAutomatic time series forecasting
Automatic time series forecastingRob Hyndman
 
Advances in automatic time series forecasting
Advances in automatic time series forecastingAdvances in automatic time series forecasting
Advances in automatic time series forecastingRob Hyndman
 
Forecasting without forecasters
Forecasting without forecastersForecasting without forecasters
Forecasting without forecastersRob Hyndman
 
Forecasting Hierarchical Time Series
Forecasting Hierarchical Time SeriesForecasting Hierarchical Time Series
Forecasting Hierarchical Time SeriesRob Hyndman
 
Slim Baltagi – Flink vs. Spark
Slim Baltagi – Flink vs. SparkSlim Baltagi – Flink vs. Spark
Slim Baltagi – Flink vs. SparkFlink Forward
 
Monal Daxini - Beaming Flink to the Cloud @ Netflix
Monal Daxini - Beaming Flink to the Cloud @ NetflixMonal Daxini - Beaming Flink to the Cloud @ Netflix
Monal Daxini - Beaming Flink to the Cloud @ NetflixFlink Forward
 
Anomaly Detection with Apache Spark
Anomaly Detection with Apache SparkAnomaly Detection with Apache Spark
Anomaly Detection with Apache SparkCloudera, Inc.
 
Probabilistic forecasting of long-term peak electricity demand
Probabilistic forecasting of long-term peak electricity demandProbabilistic forecasting of long-term peak electricity demand
Probabilistic forecasting of long-term peak electricity demandRob Hyndman
 
Planning, Sales Forecasting, and Budgeting
Planning, Sales Forecasting, and BudgetingPlanning, Sales Forecasting, and Budgeting
Planning, Sales Forecasting, and BudgetingSameer Chandrakar
 

En vedette (12)

SimpleR: tips, tricks & tools
SimpleR: tips, tricks & toolsSimpleR: tips, tricks & tools
SimpleR: tips, tricks & tools
 
R tools for hierarchical time series
R tools for hierarchical time seriesR tools for hierarchical time series
R tools for hierarchical time series
 
Coherent mortality forecasting using functional time series models
Coherent mortality forecasting using functional time series modelsCoherent mortality forecasting using functional time series models
Coherent mortality forecasting using functional time series models
 
Automatic time series forecasting
Automatic time series forecastingAutomatic time series forecasting
Automatic time series forecasting
 
Advances in automatic time series forecasting
Advances in automatic time series forecastingAdvances in automatic time series forecasting
Advances in automatic time series forecasting
 
Forecasting without forecasters
Forecasting without forecastersForecasting without forecasters
Forecasting without forecasters
 
Forecasting Hierarchical Time Series
Forecasting Hierarchical Time SeriesForecasting Hierarchical Time Series
Forecasting Hierarchical Time Series
 
Slim Baltagi – Flink vs. Spark
Slim Baltagi – Flink vs. SparkSlim Baltagi – Flink vs. Spark
Slim Baltagi – Flink vs. Spark
 
Monal Daxini - Beaming Flink to the Cloud @ Netflix
Monal Daxini - Beaming Flink to the Cloud @ NetflixMonal Daxini - Beaming Flink to the Cloud @ Netflix
Monal Daxini - Beaming Flink to the Cloud @ Netflix
 
Anomaly Detection with Apache Spark
Anomaly Detection with Apache SparkAnomaly Detection with Apache Spark
Anomaly Detection with Apache Spark
 
Probabilistic forecasting of long-term peak electricity demand
Probabilistic forecasting of long-term peak electricity demandProbabilistic forecasting of long-term peak electricity demand
Probabilistic forecasting of long-term peak electricity demand
 
Planning, Sales Forecasting, and Budgeting
Planning, Sales Forecasting, and BudgetingPlanning, Sales Forecasting, and Budgeting
Planning, Sales Forecasting, and Budgeting
 

Similaire à Academia sinica jan-2015

Prediction of Customer Churn in a Music Streaming Website
Prediction of Customer Churn in a Music Streaming WebsitePrediction of Customer Churn in a Music Streaming Website
Prediction of Customer Churn in a Music Streaming WebsiteDiptesh04
 
Australia Home Healthcare Market Report
Australia Home Healthcare Market ReportAustralia Home Healthcare Market Report
Australia Home Healthcare Market ReportInsights10
 
Heart diseases overview
Heart diseases overviewHeart diseases overview
Heart diseases overviewArhamSheikh1
 
UK Coronary Stents Market Analysis Sample Report
UK Coronary Stents Market Analysis Sample ReportUK Coronary Stents Market Analysis Sample Report
UK Coronary Stents Market Analysis Sample ReportInsights10
 
Global Flexible endoscope market Outlook 2024- sample
Global Flexible endoscope market Outlook 2024- sampleGlobal Flexible endoscope market Outlook 2024- sample
Global Flexible endoscope market Outlook 2024- sampleGoldstein Market Intelligence
 
Norway Medical and Diagnostic Laboratory Service Market Analysis Sample Report
Norway Medical and Diagnostic Laboratory Service Market Analysis Sample ReportNorway Medical and Diagnostic Laboratory Service Market Analysis Sample Report
Norway Medical and Diagnostic Laboratory Service Market Analysis Sample ReportInsights10
 
Coronavirus Diagnostics Market - Global Industry Size, Share, Trend, Opportun...
Coronavirus Diagnostics Market - Global Industry Size, Share, Trend, Opportun...Coronavirus Diagnostics Market - Global Industry Size, Share, Trend, Opportun...
Coronavirus Diagnostics Market - Global Industry Size, Share, Trend, Opportun...TechSci Research
 
Global Clinical Trial Patient Recruitment Services Market Analysis Sample Report
Global Clinical Trial Patient Recruitment Services Market Analysis Sample ReportGlobal Clinical Trial Patient Recruitment Services Market Analysis Sample Report
Global Clinical Trial Patient Recruitment Services Market Analysis Sample ReportInsights10
 
Global Veterinary Reference Laboratory (VRL) Market Research, 2018 to 2025
Global Veterinary Reference Laboratory (VRL) Market Research, 2018 to 2025Global Veterinary Reference Laboratory (VRL) Market Research, 2018 to 2025
Global Veterinary Reference Laboratory (VRL) Market Research, 2018 to 2025Signitech
 
Market Research: The Basics
Market Research: The BasicsMarket Research: The Basics
Market Research: The Basicskarinagodard
 
Pulse oximeters market
Pulse oximeters marketPulse oximeters market
Pulse oximeters marketManjushaGirme
 
Essay About Television.pdf
Essay About Television.pdfEssay About Television.pdf
Essay About Television.pdfMegan Bryant
 
Norway Patient Monitoring Investment Opportunities, Analysis and Forecasts to...
Norway Patient Monitoring Investment Opportunities, Analysis and Forecasts to...Norway Patient Monitoring Investment Opportunities, Analysis and Forecasts to...
Norway Patient Monitoring Investment Opportunities, Analysis and Forecasts to...ReportsnReports
 
Immunity Boosting Products Market, 2025
Immunity Boosting Products Market, 2025Immunity Boosting Products Market, 2025
Immunity Boosting Products Market, 2025TechSci Research
 
Capsule Endoscopy Market Is Anticipated To Touch 886.3 Million In 2022: Grand...
Capsule Endoscopy Market Is Anticipated To Touch 886.3 Million In 2022: Grand...Capsule Endoscopy Market Is Anticipated To Touch 886.3 Million In 2022: Grand...
Capsule Endoscopy Market Is Anticipated To Touch 886.3 Million In 2022: Grand...Amit M
 
Canada Clinical Diagnostics Market
Canada Clinical Diagnostics MarketCanada Clinical Diagnostics Market
Canada Clinical Diagnostics MarketInsights10
 

Similaire à Academia sinica jan-2015 (20)

Prediction of Customer Churn in a Music Streaming Website
Prediction of Customer Churn in a Music Streaming WebsitePrediction of Customer Churn in a Music Streaming Website
Prediction of Customer Churn in a Music Streaming Website
 
World Economics Update - October 2014
World Economics Update - October 2014World Economics Update - October 2014
World Economics Update - October 2014
 
Australia Home Healthcare Market Report
Australia Home Healthcare Market ReportAustralia Home Healthcare Market Report
Australia Home Healthcare Market Report
 
Heart diseases overview
Heart diseases overviewHeart diseases overview
Heart diseases overview
 
Buyer Behavior
Buyer BehaviorBuyer Behavior
Buyer Behavior
 
UK Coronary Stents Market Analysis Sample Report
UK Coronary Stents Market Analysis Sample ReportUK Coronary Stents Market Analysis Sample Report
UK Coronary Stents Market Analysis Sample Report
 
Global Flexible endoscope market Outlook 2024- sample
Global Flexible endoscope market Outlook 2024- sampleGlobal Flexible endoscope market Outlook 2024- sample
Global Flexible endoscope market Outlook 2024- sample
 
Norway Medical and Diagnostic Laboratory Service Market Analysis Sample Report
Norway Medical and Diagnostic Laboratory Service Market Analysis Sample ReportNorway Medical and Diagnostic Laboratory Service Market Analysis Sample Report
Norway Medical and Diagnostic Laboratory Service Market Analysis Sample Report
 
Coronavirus Diagnostics Market - Global Industry Size, Share, Trend, Opportun...
Coronavirus Diagnostics Market - Global Industry Size, Share, Trend, Opportun...Coronavirus Diagnostics Market - Global Industry Size, Share, Trend, Opportun...
Coronavirus Diagnostics Market - Global Industry Size, Share, Trend, Opportun...
 
Global Clinical Trial Patient Recruitment Services Market Analysis Sample Report
Global Clinical Trial Patient Recruitment Services Market Analysis Sample ReportGlobal Clinical Trial Patient Recruitment Services Market Analysis Sample Report
Global Clinical Trial Patient Recruitment Services Market Analysis Sample Report
 
Global Veterinary Reference Laboratory (VRL) Market Research, 2018 to 2025
Global Veterinary Reference Laboratory (VRL) Market Research, 2018 to 2025Global Veterinary Reference Laboratory (VRL) Market Research, 2018 to 2025
Global Veterinary Reference Laboratory (VRL) Market Research, 2018 to 2025
 
Market Research: The Basics
Market Research: The BasicsMarket Research: The Basics
Market Research: The Basics
 
Pulse oximeters market
Pulse oximeters marketPulse oximeters market
Pulse oximeters market
 
Essay About Television.pdf
Essay About Television.pdfEssay About Television.pdf
Essay About Television.pdf
 
Norway Patient Monitoring Investment Opportunities, Analysis and Forecasts to...
Norway Patient Monitoring Investment Opportunities, Analysis and Forecasts to...Norway Patient Monitoring Investment Opportunities, Analysis and Forecasts to...
Norway Patient Monitoring Investment Opportunities, Analysis and Forecasts to...
 
How the hospitality industry views and analyses hotel data – An industry pers...
How the hospitality industry views and analyses hotel data – An industry pers...How the hospitality industry views and analyses hotel data – An industry pers...
How the hospitality industry views and analyses hotel data – An industry pers...
 
Immunity Boosting Products Market, 2025
Immunity Boosting Products Market, 2025Immunity Boosting Products Market, 2025
Immunity Boosting Products Market, 2025
 
Capsule Endoscopy Market Is Anticipated To Touch 886.3 Million In 2022: Grand...
Capsule Endoscopy Market Is Anticipated To Touch 886.3 Million In 2022: Grand...Capsule Endoscopy Market Is Anticipated To Touch 886.3 Million In 2022: Grand...
Capsule Endoscopy Market Is Anticipated To Touch 886.3 Million In 2022: Grand...
 
Time series
Time seriesTime series
Time series
 
Canada Clinical Diagnostics Market
Canada Clinical Diagnostics MarketCanada Clinical Diagnostics Market
Canada Clinical Diagnostics Market
 

Dernier

Dust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEDust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEaurabinda banchhor
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptshraddhaparab530
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
TEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxTEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxruthvilladarez
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmStan Meyer
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 

Dernier (20)

Dust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEDust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSE
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.ppt
 
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptxINCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
TEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxTEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docx
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and Film
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 

Academia sinica jan-2015

  • 1. Rob J Hyndman Visualizing and forecasting big time series data Victoria: scaled
  • 2. Outline 1 Examples of big time series 2 Time series visualisation 3 BLUF: Best Linear Unbiased Forecasts 4 Application: Australian tourism 5 Application: Australian labour market 6 Fast computation tricks 7 hts package for R 8 References Visualising and forecasting big time series data Examples of big time series 2
  • 3. 1. Australian tourism demand Visualising and forecasting big time series data Examples of big time series 3
  • 4. 1. Australian tourism demand Visualising and forecasting big time series data Examples of big time series 3 Quarterly data on visitor night from 1998:Q1 – 2013:Q4 From: National Visitor Survey, based on annual interviews of 120,000 Australians aged 15+, collected by Tourism Research Australia. Split by 7 states, 27 zones and 76 regions (a geographical hierarchy) Also split by purpose of travel Holiday Visiting friends and relatives (VFR) Business Other 304 bottom-level series
  • 5. 2. Labour market participation Australia and New Zealand Standard Classification of Occupations 8 major groups 43 sub-major groups 97 minor groups – 359 unit groups * 1023 occupations Example: statistician 2 Professionals 22 Business, Human Resource and Marketing Professionals 224 Information and Organisation Professionals 2241 Actuaries, Mathematicians and Statisticians 224113 Statistician Visualising and forecasting big time series data Examples of big time series 4
  • 6. 2. Labour market participation Australia and New Zealand Standard Classification of Occupations 8 major groups 43 sub-major groups 97 minor groups – 359 unit groups * 1023 occupations Example: statistician 2 Professionals 22 Business, Human Resource and Marketing Professionals 224 Information and Organisation Professionals 2241 Actuaries, Mathematicians and Statisticians 224113 Statistician Visualising and forecasting big time series data Examples of big time series 4
  • 7. 3. PBS sales Visualising and forecasting big time series data Examples of big time series 5
  • 8. 3. PBS sales ATC drug classification A Alimentary tract and metabolism B Blood and blood forming organs C Cardiovascular system D Dermatologicals G Genito-urinary system and sex hormones H Systemic hormonal preparations, excluding sex hormones and insulins J Anti-infectives for systemic use L Antineoplastic and immunomodulating agents M Musculo-skeletal system N Nervous system P Antiparasitic products, insecticides and repellents R Respiratory system S Sensory organs V Various Visualising and forecasting big time series data Examples of big time series 6
  • 9. 3. PBS sales ATC drug classification A Alimentary tract and metabolism14 classes A10 Drugs used in diabetes84 classes A10B Blood glucose lowering drugs A10BA Biguanides A10BA02 Metformin Visualising and forecasting big time series data Examples of big time series 7
  • 10. 4. Spectacle sales Visualising and forecasting big time series data Examples of big time series 8 Monthly sales data from 2000 – 2014 Provided by a large spectacle manufacturer Split by brand (26), gender (3), price range (6), materials (4), and stores (600) About a million bottom-level series
  • 11. 4. Spectacle sales Visualising and forecasting big time series data Examples of big time series 8 Monthly sales data from 2000 – 2014 Provided by a large spectacle manufacturer Split by brand (26), gender (3), price range (6), materials (4), and stores (600) About a million bottom-level series
  • 12. 4. Spectacle sales Visualising and forecasting big time series data Examples of big time series 8 Monthly sales data from 2000 – 2014 Provided by a large spectacle manufacturer Split by brand (26), gender (3), price range (6), materials (4), and stores (600) About a million bottom-level series
  • 13. 4. Spectacle sales Visualising and forecasting big time series data Examples of big time series 8 Monthly sales data from 2000 – 2014 Provided by a large spectacle manufacturer Split by brand (26), gender (3), price range (6), materials (4), and stores (600) About a million bottom-level series
  • 14. Hierarchical time series A hierarchical time series is a collection of several time series that are linked together in a hierarchical structure. Total A AA AB AC B BA BB BC C CA CB CC Examples Net labour turnover Pharmaceutical sales Tourism by state and region Visualising and forecasting big time series data Examples of big time series 9
  • 15. Hierarchical time series A hierarchical time series is a collection of several time series that are linked together in a hierarchical structure. Total A AA AB AC B BA BB BC C CA CB CC Examples Net labour turnover Pharmaceutical sales Tourism by state and region Visualising and forecasting big time series data Examples of big time series 9
  • 16. Hierarchical time series A hierarchical time series is a collection of several time series that are linked together in a hierarchical structure. Total A AA AB AC B BA BB BC C CA CB CC Examples Net labour turnover Pharmaceutical sales Tourism by state and region Visualising and forecasting big time series data Examples of big time series 9
  • 17. Hierarchical time series A hierarchical time series is a collection of several time series that are linked together in a hierarchical structure. Total A AA AB AC B BA BB BC C CA CB CC Examples Net labour turnover Pharmaceutical sales Tourism by state and region Visualising and forecasting big time series data Examples of big time series 9
  • 18. Grouped time series A grouped time series is a collection of time series that can be grouped together in a number of non-hierarchical ways. Total A AX AY B BX BY Total X AX BX Y AY BY Examples Tourism by state and purpose of travel Glasses by brand and store Visualising and forecasting big time series data Examples of big time series 10
  • 19. Grouped time series A grouped time series is a collection of time series that can be grouped together in a number of non-hierarchical ways. Total A AX AY B BX BY Total X AX BX Y AY BY Examples Tourism by state and purpose of travel Glasses by brand and store Visualising and forecasting big time series data Examples of big time series 10
  • 20. Grouped time series A grouped time series is a collection of time series that can be grouped together in a number of non-hierarchical ways. Total A AX AY B BX BY Total X AX BX Y AY BY Examples Tourism by state and purpose of travel Glasses by brand and store Visualising and forecasting big time series data Examples of big time series 10
  • 21. Outline 1 Examples of big time series 2 Time series visualisation 3 BLUF: Best Linear Unbiased Forecasts 4 Application: Australian tourism 5 Application: Australian labour market 6 Fast computation tricks 7 hts package for R 8 References Visualising and forecasting big time series data Time series visualisation 11
  • 23. Kite diagrams 000 Line graph profile Duplicate & flip around the hori- zontal axis Fill the colour Visualising and forecasting big time series data Time series visualisation 13
  • 24. Kite diagrams: Victorian tourism 20002010 Holiday 20002010 VFR 20002010 Business 20002010 BAA BAB BAC BBA BCA BCB BCC BDA BDB BDC BDD BDE BDF BEA BEB BEC BED BEE BEF Other BEG Victoria Visualising and forecasting big time series data Time series visualisation 14
  • 25. Kite diagrams: Victorian tourism Visualising and forecasting big time series data Time series visualisation 14
  • 26. Kite diagrams: Victorian tourism 20002010 Holiday 20002010 VFR 20002010 Business 20002010 BAA BAB BAC BBA BCA BCB BCC BDA BDB BDC BDD BDE BDF BEA BEB BEC BED BEE BEF Other BEG Victoria: scaled Visualising and forecasting big time series data Time series visualisation 14
  • 27. An STL decomposition STL decomposition of tourism demand for holidays in Peninsula 5.06.07.0 data −0.50.5 seasonal 5.86.16.4 trend −0.40.0 2000 2005 2010 remainder Visualising and forecasting big time series data Time series visualisation 15
  • 28. Seasonal stacked bar chart Place positive values above the origin while negative values below the origin Map the bar length to the magnitude Encode quarters by colours Visualising and forecasting big time series data Time series visualisation 16
  • 29. Seasonal stacked bar chart Place positive values above the origin while negative values below the origin Map the bar length to the magnitude Encode quarters by colours −1.0 −0.5 0.0 0.5 1.0 Holiday BAA BABBACBBABCABCBBCCBDABDBBDCBDDBDEBDF BEA BEBBECBEDBEE BEFBEG Regions SeasonalComponent Qtr Q1 Q2 Q3 Q4 Visualising and forecasting big time series data Time series visualisation 16
  • 30. Seasonal stacked bar chart: VIC Visualising and forecasting big time series data Time series visualisation 17
  • 31. Seasonal stacked bar chart: VIC −1.0 −0.5 0.0 0.5 1.0 −1.0 −0.5 0.0 0.5 1.0 −1.0 −0.5 0.0 0.5 1.0 −1.0 −0.5 0.0 0.5 1.0 HolidayVFRBusinessOther BAABABBACBBABCABCBBCCBDABDBBDCBDDBDEBDFBEABEBBECBEDBEEBEFBEG Regions SeasonalComponent Qtr Q1 Q2 Q3 Q4 Visualising and forecasting big time series data Time series visualisation 17
  • 32. Corrgram of remainder Visualising and forecasting big time series data Time series visualisation 18 Compute the correlations among the remainder components Render both the sign and magnitude using a colour mapping of two hues Order variables according to the first principal component of the correlations.
  • 33. Corrgram of remainder: VIC Visualising and forecasting big time series data Time series visualisation 19 −1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 BEEHolBEFOthBEEOthBDEOthBEBOthBEABusBEFBusBDCOthBACHolBEBBusBEAVisBBAHolBDEHolBABOthBAAVisBAAHolBDCHolBBABusBCBHolBEGBusBDDVisBABVisBDAVisBEAOthBDFHolBEEBusBAAOthBACOthBDAOthBDEBusBCBOthBACBusBEBVisBACVisBCAOthBEFVisBCBVisBEDHolBEGOthBDBHolBABBusBEBHolBDFBusBECHolBCAHolBDBOthBEAHolBDCBusBECVisBDBVisBCCHolBBAVisBABHolBBAOthBCCOthBCBBusBCCVisBEGVisBDDHolBECOthBDCVisBAABusBCCBusBECBusBCAVisBDFVisBEGHolBDDOthBEDOthBEDVisBDDBusBDEVisBEFHolBEEVisBDBBusBDABusBDAHolBCABusBDFOthBEDBus BEEHolBEFOthBEEOthBDEOthBEBOthBEABusBEFBusBDCOthBACHolBEBBusBEAVisBBAHolBDEHolBABOthBAAVisBAAHolBDCHolBBABusBCBHolBEGBusBDDVisBABVisBDAVisBEAOthBDFHolBEEBusBAAOthBACOthBDAOthBDEBusBCBOthBACBusBEBVisBACVisBCAOthBEFVisBCBVisBEDHolBEGOthBDBHolBABBusBEBHolBDFBusBECHolBCAHolBDBOthBEAHolBDCBusBECVisBDBVisBCCHolBBAVisBABHolBBAOthBCCOthBCBBusBCCVisBEGVisBDDHolBECOthBDCVisBAABusBCCBusBECBusBCAVisBDFVisBEGHolBDDOthBEDOthBEDVisBDDBusBDEVisBEFHolBEEVisBDBBusBDABusBDAHolBCABusBDFOthBEDBus
  • 34. Corrgram of remainder: VIC Visualising and forecasting big time series data Time series visualisation 19 −1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 BDAHol BDDHol BEBHol BEFHol BECHol BEDHol BDFHol BCCHol BDCHol BCAHol BEAHol BEGHol BBAHol BAAHol BABHol BDBHol BDEHol BACHol BCBHol BEEHol BDAHol BDDHol BEBHol BEFHol BECHol BEDHol BDFHol BCCHol BDCHol BCAHol BEAHol BEGHol BBAHol BAAHol BABHol BDBHol BDEHol BACHol BCBHol BEEHol
  • 35. Corrgram of remainder: TAS Visualising and forecasting big time series data Time series visualisation 20 −1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 FCAHol FBBHol FBAHol FAAHol FCBHol FCAVis FBBVis FAAVis FCBBus FAAOth FCAOth FBBOth FBABus FBAOth FCBVis FCABus FBAVis FCBOth FBBBus FAABus FCAHol FBBHol FBAHol FAAHol FCBHol FCAVis FBBVis FAAVis FCBBus FAAOth FCAOth FBBOth FBABus FBAOth FCBVis FCABus FBAVis FCBOth FBBBus FAABus
  • 36. Principal components decomposition Visualising and forecasting big time series data Time series visualisation 21 −25−15−55 PC1 −50510 PC2 −50510 2000 2005 2010 PC3 Time First three PCs
  • 37. Principal components decomposition Visualising and forecasting big time series data Time series visualisation 21 −25−20−15−10−505 Season plot: PC1 Month q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
  • 38. Principal components decomposition Visualising and forecasting big time series data Time series visualisation 21 −50510 Season plot: PC2 Month q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
  • 39. Principal components decomposition Visualising and forecasting big time series data Time series visualisation 21 −50510 Season plot: PC3 Month q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
  • 40. Principal components decomposition Visualising and forecasting big time series data Time series visualisation 22 q q q q q q q q q q q q q q q q q q qq q q q q q q q q q q qq q q qq q q q q q q q q q q q q q q q q q qq q q q q q q q q q q q q q q q q q q q q q q q qq q q q q q q q q q q q q q q q q q q qq q q q q q q q q q q q q q q q q qq q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q qq q q q q q q q q q q q q q q q q q q q q q q q q q q qq q q q q q q q q q q q q qq q q q q q q q q q q q q q q q q q qq q q qq q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q −0.15 −0.10 −0.05 0.00 0.05 −0.100.000.050.100.150.20 Loading 1 Loading2 q q q q q q q NSW VIC QLD SA TAS NT WA
  • 41. Principal components decomposition Visualising and forecasting big time series data Time series visualisation 22 q q q q q q q q q q q q q q q q q q qq q q q q q q q q q q qq q q qq q q q q q q q q q q q q q q q q q qq q q q q q q q q q q q q q q q q q q q q q q q qq q q q q q q q q q q q q q q q q q q qq q q q q q q q q q q q q q q q q qq q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q qq q q q q q q q q q q q q q q q q q q q q q q q q q q qq q q q q q q q q q q q q qq q q q q q q q q q q q q q q q q q qq q q qq q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q −0.15 −0.10 −0.05 0.00 0.05 −0.100.000.050.100.150.20 Loading 1 Loading2 q q q q Hol Vis Bus Oth
  • 42. Feature analysis Summarize each time series with a feature vector: strength of trend summer seasonality winter seasonality Box-Pierce statistic on remainder of STL Lumpiness (variance of annual variances of remainder) Do PCA on feature matrix Visualising and forecasting big time series data Time series visualisation 23
  • 43. Feature analysis Summarize each time series with a feature vector: strength of trend summer seasonality winter seasonality Box-Pierce statistic on remainder of STL Lumpiness (variance of annual variances of remainder) Do PCA on feature matrix Visualising and forecasting big time series data Time series visualisation 23
  • 44. Feature analysis Summarize each time series with a feature vector: strength of trend summer seasonality winter seasonality Box-Pierce statistic on remainder of STL Lumpiness (variance of annual variances of remainder) Do PCA on feature matrix Visualising and forecasting big time series data Time series visualisation 23
  • 45. Feature analysis Summarize each time series with a feature vector: strength of trend summer seasonality winter seasonality Box-Pierce statistic on remainder of STL Lumpiness (variance of annual variances of remainder) Do PCA on feature matrix Visualising and forecasting big time series data Time series visualisation 23
  • 46. Feature analysis Summarize each time series with a feature vector: strength of trend summer seasonality winter seasonality Box-Pierce statistic on remainder of STL Lumpiness (variance of annual variances of remainder) Do PCA on feature matrix Visualising and forecasting big time series data Time series visualisation 23
  • 47. Feature analysis Summarize each time series with a feature vector: strength of trend summer seasonality winter seasonality Box-Pierce statistic on remainder of STL Lumpiness (variance of annual variances of remainder) Do PCA on feature matrix Visualising and forecasting big time series data Time series visualisation 23
  • 48. Feature analysis Summarize each time series with a feature vector: strength of trend summer seasonality winter seasonality Box-Pierce statistic on remainder of STL Lumpiness (variance of annual variances of remainder) Do PCA on feature matrix Visualising and forecasting big time series data Time series visualisation 23
  • 49. Feature analysis Visualising and forecasting big time series data Time series visualisation 24 q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q qq q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q qq q q q q q q q q q qq q q q q q q q q q q q q q q q q q q q q q q qq q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q qq q q q q q q q q qq q q q q q q q q q q q q q q q q q q q q qq q q q q q q q q q q q q q q q q q q q q q q q q q q q q trend summer wintercorr lum py −2 0 2 −5.0 −2.5 0.0 2.5 PC1 (39.1% explained var.) PC2(23.6%explainedvar.) groups q q q q Bus Hol Oth Vis
  • 50. Feature analysis Visualising and forecasting big time series data Time series visualisation 24 q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q qq q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q qq q q q q q q q q q qq q q q q q q q q q q q q q q q q q q q q q q qq q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q qq q q q q q q q q qq q q q q q q q q q q q q q q q q q q q q qq q q q q q q q q q q q q q q q q q q q q q q q q q q q q trend summer wintercorr lum py −2 0 2 −5.0 −2.5 0.0 2.5 PC1 (39.1% explained var.) PC2(23.6%explainedvar.) groups q q q q q q q NSW NT QLD SA TAS VIC WA
  • 51. Outline 1 Examples of big time series 2 Time series visualisation 3 BLUF: Best Linear Unbiased Forecasts 4 Application: Australian tourism 5 Application: Australian labour market 6 Fast computation tricks 7 hts package for R 8 References Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 25
  • 52. Hierarchical/grouped time series Forecasts should be “aggregate consistent”, unbiased, minimum variance. Existing methods: ¢ Bottom-up ¢ Top-down ¢ Middle-out How to compute forecast intervals? Most research is concerned about relative performance of existing methods. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 26
  • 53. Hierarchical/grouped time series Forecasts should be “aggregate consistent”, unbiased, minimum variance. Existing methods: ¢ Bottom-up ¢ Top-down ¢ Middle-out How to compute forecast intervals? Most research is concerned about relative performance of existing methods. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 26
  • 54. Hierarchical/grouped time series Forecasts should be “aggregate consistent”, unbiased, minimum variance. Existing methods: ¢ Bottom-up ¢ Top-down ¢ Middle-out How to compute forecast intervals? Most research is concerned about relative performance of existing methods. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 26
  • 55. Hierarchical/grouped time series Forecasts should be “aggregate consistent”, unbiased, minimum variance. Existing methods: ¢ Bottom-up ¢ Top-down ¢ Middle-out How to compute forecast intervals? Most research is concerned about relative performance of existing methods. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 26
  • 56. Hierarchical/grouped time series Forecasts should be “aggregate consistent”, unbiased, minimum variance. Existing methods: ¢ Bottom-up ¢ Top-down ¢ Middle-out How to compute forecast intervals? Most research is concerned about relative performance of existing methods. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 26
  • 57. Hierarchical/grouped time series Forecasts should be “aggregate consistent”, unbiased, minimum variance. Existing methods: ¢ Bottom-up ¢ Top-down ¢ Middle-out How to compute forecast intervals? Most research is concerned about relative performance of existing methods. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 26
  • 58. Hierarchical/grouped time series Forecasts should be “aggregate consistent”, unbiased, minimum variance. Existing methods: ¢ Bottom-up ¢ Top-down ¢ Middle-out How to compute forecast intervals? Most research is concerned about relative performance of existing methods. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 26
  • 59. Top-down method Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 27 Advantages Works well in presence of low counts. Single forecasting model easy to build Provides reliable forecasts for aggregate levels. Disadvantages Loss of information, especially individual series dynamics. Distribution of forecasts to lower levels can be difficult No prediction intervals
  • 60. Top-down method Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 27 Advantages Works well in presence of low counts. Single forecasting model easy to build Provides reliable forecasts for aggregate levels. Disadvantages Loss of information, especially individual series dynamics. Distribution of forecasts to lower levels can be difficult No prediction intervals
  • 61. Top-down method Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 27 Advantages Works well in presence of low counts. Single forecasting model easy to build Provides reliable forecasts for aggregate levels. Disadvantages Loss of information, especially individual series dynamics. Distribution of forecasts to lower levels can be difficult No prediction intervals
  • 62. Top-down method Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 27 Advantages Works well in presence of low counts. Single forecasting model easy to build Provides reliable forecasts for aggregate levels. Disadvantages Loss of information, especially individual series dynamics. Distribution of forecasts to lower levels can be difficult No prediction intervals
  • 63. Top-down method Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 27 Advantages Works well in presence of low counts. Single forecasting model easy to build Provides reliable forecasts for aggregate levels. Disadvantages Loss of information, especially individual series dynamics. Distribution of forecasts to lower levels can be difficult No prediction intervals
  • 64. Top-down method Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 27 Advantages Works well in presence of low counts. Single forecasting model easy to build Provides reliable forecasts for aggregate levels. Disadvantages Loss of information, especially individual series dynamics. Distribution of forecasts to lower levels can be difficult No prediction intervals
  • 65. Bottom-up method Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 28 Advantages No loss of information. Better captures dynamics of individual series. Disadvantages Large number of series to be forecast. Constructing forecasting models is harder because of noisy data at bottom level. No prediction intervals
  • 66. Bottom-up method Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 28 Advantages No loss of information. Better captures dynamics of individual series. Disadvantages Large number of series to be forecast. Constructing forecasting models is harder because of noisy data at bottom level. No prediction intervals
  • 67. Bottom-up method Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 28 Advantages No loss of information. Better captures dynamics of individual series. Disadvantages Large number of series to be forecast. Constructing forecasting models is harder because of noisy data at bottom level. No prediction intervals
  • 68. Bottom-up method Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 28 Advantages No loss of information. Better captures dynamics of individual series. Disadvantages Large number of series to be forecast. Constructing forecasting models is harder because of noisy data at bottom level. No prediction intervals
  • 69. Bottom-up method Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 28 Advantages No loss of information. Better captures dynamics of individual series. Disadvantages Large number of series to be forecast. Constructing forecasting models is harder because of noisy data at bottom level. No prediction intervals
  • 70. The BLUF approach Hyndman et al (CSDA 2011) proposed a new statistical framework for forecasting hierarchical time series which: 1 provides point forecasts that are consistent across the hierarchy; 2 allows for correlations and interaction between series at each level; 3 provides estimates of forecast uncertainty which are consistent across the hierarchy; 4 allows for ad hoc adjustments and inclusion of covariates at any level. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 29
  • 71. The BLUF approach Hyndman et al (CSDA 2011) proposed a new statistical framework for forecasting hierarchical time series which: 1 provides point forecasts that are consistent across the hierarchy; 2 allows for correlations and interaction between series at each level; 3 provides estimates of forecast uncertainty which are consistent across the hierarchy; 4 allows for ad hoc adjustments and inclusion of covariates at any level. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 29
  • 72. The BLUF approach Hyndman et al (CSDA 2011) proposed a new statistical framework for forecasting hierarchical time series which: 1 provides point forecasts that are consistent across the hierarchy; 2 allows for correlations and interaction between series at each level; 3 provides estimates of forecast uncertainty which are consistent across the hierarchy; 4 allows for ad hoc adjustments and inclusion of covariates at any level. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 29
  • 73. The BLUF approach Hyndman et al (CSDA 2011) proposed a new statistical framework for forecasting hierarchical time series which: 1 provides point forecasts that are consistent across the hierarchy; 2 allows for correlations and interaction between series at each level; 3 provides estimates of forecast uncertainty which are consistent across the hierarchy; 4 allows for ad hoc adjustments and inclusion of covariates at any level. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 29
  • 74. Hierarchical data Total A B C Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 30 Yt : observed aggregate of all series at time t. YX,t : observation on series X at time t. Bt : vector of all series at bottom level in time t.
  • 75. Hierarchical data Total A B C Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 30 Yt : observed aggregate of all series at time t. YX,t : observation on series X at time t. Bt : vector of all series at bottom level in time t.
  • 76. Hierarchical data Total A B C yt = [Yt, YA,t, YB,t, YC,t] =     1 1 1 1 0 0 0 1 0 0 0 1       YA,t YB,t YC,t   Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 30 Yt : observed aggregate of all series at time t. YX,t : observation on series X at time t. Bt : vector of all series at bottom level in time t.
  • 77. Hierarchical data Total A B C yt = [Yt, YA,t, YB,t, YC,t] =     1 1 1 1 0 0 0 1 0 0 0 1     S   YA,t YB,t YC,t   Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 30 Yt : observed aggregate of all series at time t. YX,t : observation on series X at time t. Bt : vector of all series at bottom level in time t.
  • 78. Hierarchical data Total A B C yt = [Yt, YA,t, YB,t, YC,t] =     1 1 1 1 0 0 0 1 0 0 0 1     S   YA,t YB,t YC,t   Bt Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 30 Yt : observed aggregate of all series at time t. YX,t : observation on series X at time t. Bt : vector of all series at bottom level in time t.
  • 79. Hierarchical data Total A B C yt = [Yt, YA,t, YB,t, YC,t] =     1 1 1 1 0 0 0 1 0 0 0 1     S   YA,t YB,t YC,t   Bt yt = SBt Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 30 Yt : observed aggregate of all series at time t. YX,t : observation on series X at time t. Bt : vector of all series at bottom level in time t.
  • 80. Hierarchical data Total A AX AY AZ B BX BY BZ C CX CY CZ yt =             Yt YA,t YB,t YC,t YAX,t YAY,t YAZ,t YBX,t YBY,t YBZ,t YCX,t YCY,t YCZ,t             =             1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1             S        YAX,t YAY,t YAZ,t YBX,t YBY,t YBZ,t YCX,t YCY,t YCZ,t        Bt Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 31
  • 81. Hierarchical data Total A AX AY AZ B BX BY BZ C CX CY CZ yt =             Yt YA,t YB,t YC,t YAX,t YAY,t YAZ,t YBX,t YBY,t YBZ,t YCX,t YCY,t YCZ,t             =             1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1             S        YAX,t YAY,t YAZ,t YBX,t YBY,t YBZ,t YCX,t YCY,t YCZ,t        Bt Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 31
  • 82. Hierarchical data Total A AX AY AZ B BX BY BZ C CX CY CZ yt =             Yt YA,t YB,t YC,t YAX,t YAY,t YAZ,t YBX,t YBY,t YBZ,t YCX,t YCY,t YCZ,t             =             1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1             S        YAX,t YAY,t YAZ,t YBX,t YBY,t YBZ,t YCX,t YCY,t YCZ,t        Bt Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 31 yt = SBt
  • 83. Grouped data AX AY A BX BY B X Y Total yt =              Yt YA,t YB,t YX,t YY,t YAX,t YAY,t YBX,t YBY,t              =              1 1 1 1 1 1 0 0 0 0 1 1 1 0 1 0 0 1 0 1 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1              S    YAX,t YAY,t YBX,t YBY,t    Bt Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 32
  • 84. Grouped data AX AY A BX BY B X Y Total yt =              Yt YA,t YB,t YX,t YY,t YAX,t YAY,t YBX,t YBY,t              =              1 1 1 1 1 1 0 0 0 0 1 1 1 0 1 0 0 1 0 1 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1              S    YAX,t YAY,t YBX,t YBY,t    Bt Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 32
  • 85. Grouped data AX AY A BX BY B X Y Total yt =              Yt YA,t YB,t YX,t YY,t YAX,t YAY,t YBX,t YBY,t              =              1 1 1 1 1 1 0 0 0 0 1 1 1 0 1 0 0 1 0 1 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1              S    YAX,t YAY,t YBX,t YBY,t    Bt Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 32 yt = SBt
  • 86. Forecasting notation Let ˆyn(h) be vector of initial h-step forecasts, made at time n, stacked in same order as yt. (They may not add up.) Hierarchical forecasting methods of the form: ˜yn(h) = SPˆyn(h) for some matrix P. P extracts and combines base forecasts ˆyn(h) to get bottom-level forecasts. S adds them up Revised reconciled forecasts: ˜yn(h). Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 33
  • 87. Forecasting notation Let ˆyn(h) be vector of initial h-step forecasts, made at time n, stacked in same order as yt. (They may not add up.) Hierarchical forecasting methods of the form: ˜yn(h) = SPˆyn(h) for some matrix P. P extracts and combines base forecasts ˆyn(h) to get bottom-level forecasts. S adds them up Revised reconciled forecasts: ˜yn(h). Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 33
  • 88. Forecasting notation Let ˆyn(h) be vector of initial h-step forecasts, made at time n, stacked in same order as yt. (They may not add up.) Hierarchical forecasting methods of the form: ˜yn(h) = SPˆyn(h) for some matrix P. P extracts and combines base forecasts ˆyn(h) to get bottom-level forecasts. S adds them up Revised reconciled forecasts: ˜yn(h). Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 33
  • 89. Forecasting notation Let ˆyn(h) be vector of initial h-step forecasts, made at time n, stacked in same order as yt. (They may not add up.) Hierarchical forecasting methods of the form: ˜yn(h) = SPˆyn(h) for some matrix P. P extracts and combines base forecasts ˆyn(h) to get bottom-level forecasts. S adds them up Revised reconciled forecasts: ˜yn(h). Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 33
  • 90. Forecasting notation Let ˆyn(h) be vector of initial h-step forecasts, made at time n, stacked in same order as yt. (They may not add up.) Hierarchical forecasting methods of the form: ˜yn(h) = SPˆyn(h) for some matrix P. P extracts and combines base forecasts ˆyn(h) to get bottom-level forecasts. S adds them up Revised reconciled forecasts: ˜yn(h). Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 33
  • 91. Forecasting notation Let ˆyn(h) be vector of initial h-step forecasts, made at time n, stacked in same order as yt. (They may not add up.) Hierarchical forecasting methods of the form: ˜yn(h) = SPˆyn(h) for some matrix P. P extracts and combines base forecasts ˆyn(h) to get bottom-level forecasts. S adds them up Revised reconciled forecasts: ˜yn(h). Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 33
  • 92. Bottom-up forecasts ˜yn(h) = SPˆyn(h) Bottom-up forecasts are obtained using P = [0 | I] , where 0 is null matrix and I is identity matrix. P matrix extracts only bottom-level forecasts from ˆyn(h) S adds them up to give the bottom-up forecasts. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 34
  • 93. Bottom-up forecasts ˜yn(h) = SPˆyn(h) Bottom-up forecasts are obtained using P = [0 | I] , where 0 is null matrix and I is identity matrix. P matrix extracts only bottom-level forecasts from ˆyn(h) S adds them up to give the bottom-up forecasts. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 34
  • 94. Bottom-up forecasts ˜yn(h) = SPˆyn(h) Bottom-up forecasts are obtained using P = [0 | I] , where 0 is null matrix and I is identity matrix. P matrix extracts only bottom-level forecasts from ˆyn(h) S adds them up to give the bottom-up forecasts. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 34
  • 95. Top-down forecasts ˜yn(h) = SPˆyn(h) Top-down forecasts are obtained using P = [p | 0] where p = [p1, p2, . . . , pmK ] is a vector of proportions that sum to one. P distributes forecasts of the aggregate to the lowest level series. Different methods of top-down forecasting lead to different proportionality vectors p. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 35
  • 96. Top-down forecasts ˜yn(h) = SPˆyn(h) Top-down forecasts are obtained using P = [p | 0] where p = [p1, p2, . . . , pmK ] is a vector of proportions that sum to one. P distributes forecasts of the aggregate to the lowest level series. Different methods of top-down forecasting lead to different proportionality vectors p. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 35
  • 97. Top-down forecasts ˜yn(h) = SPˆyn(h) Top-down forecasts are obtained using P = [p | 0] where p = [p1, p2, . . . , pmK ] is a vector of proportions that sum to one. P distributes forecasts of the aggregate to the lowest level series. Different methods of top-down forecasting lead to different proportionality vectors p. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 35
  • 98. General properties: bias ˜yn(h) = SPˆyn(h) Assume: base forecasts ˆyn(h) are unbiased: E[ˆyn(h)|y1, . . . , yn] = E[yn+h|y1, . . . , yn] Let ˆBn(h) be bottom level base forecasts with βn(h) = E[ˆBn(h)|y1, . . . , yn]. Then E[ˆyn(h)] = Sβn(h). We want the revised forecasts to be unbiased: E[˜yn(h)] = SPSβn(h) = Sβn(h). Result will hold provided SPS = S. True for bottom-up, but not for any top-down method or middle-out method. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 36
  • 99. General properties: bias ˜yn(h) = SPˆyn(h) Assume: base forecasts ˆyn(h) are unbiased: E[ˆyn(h)|y1, . . . , yn] = E[yn+h|y1, . . . , yn] Let ˆBn(h) be bottom level base forecasts with βn(h) = E[ˆBn(h)|y1, . . . , yn]. Then E[ˆyn(h)] = Sβn(h). We want the revised forecasts to be unbiased: E[˜yn(h)] = SPSβn(h) = Sβn(h). Result will hold provided SPS = S. True for bottom-up, but not for any top-down method or middle-out method. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 36
  • 100. General properties: bias ˜yn(h) = SPˆyn(h) Assume: base forecasts ˆyn(h) are unbiased: E[ˆyn(h)|y1, . . . , yn] = E[yn+h|y1, . . . , yn] Let ˆBn(h) be bottom level base forecasts with βn(h) = E[ˆBn(h)|y1, . . . , yn]. Then E[ˆyn(h)] = Sβn(h). We want the revised forecasts to be unbiased: E[˜yn(h)] = SPSβn(h) = Sβn(h). Result will hold provided SPS = S. True for bottom-up, but not for any top-down method or middle-out method. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 36
  • 101. General properties: bias ˜yn(h) = SPˆyn(h) Assume: base forecasts ˆyn(h) are unbiased: E[ˆyn(h)|y1, . . . , yn] = E[yn+h|y1, . . . , yn] Let ˆBn(h) be bottom level base forecasts with βn(h) = E[ˆBn(h)|y1, . . . , yn]. Then E[ˆyn(h)] = Sβn(h). We want the revised forecasts to be unbiased: E[˜yn(h)] = SPSβn(h) = Sβn(h). Result will hold provided SPS = S. True for bottom-up, but not for any top-down method or middle-out method. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 36
  • 102. General properties: bias ˜yn(h) = SPˆyn(h) Assume: base forecasts ˆyn(h) are unbiased: E[ˆyn(h)|y1, . . . , yn] = E[yn+h|y1, . . . , yn] Let ˆBn(h) be bottom level base forecasts with βn(h) = E[ˆBn(h)|y1, . . . , yn]. Then E[ˆyn(h)] = Sβn(h). We want the revised forecasts to be unbiased: E[˜yn(h)] = SPSβn(h) = Sβn(h). Result will hold provided SPS = S. True for bottom-up, but not for any top-down method or middle-out method. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 36
  • 103. General properties: bias ˜yn(h) = SPˆyn(h) Assume: base forecasts ˆyn(h) are unbiased: E[ˆyn(h)|y1, . . . , yn] = E[yn+h|y1, . . . , yn] Let ˆBn(h) be bottom level base forecasts with βn(h) = E[ˆBn(h)|y1, . . . , yn]. Then E[ˆyn(h)] = Sβn(h). We want the revised forecasts to be unbiased: E[˜yn(h)] = SPSβn(h) = Sβn(h). Result will hold provided SPS = S. True for bottom-up, but not for any top-down method or middle-out method. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 36
  • 104. General properties: bias ˜yn(h) = SPˆyn(h) Assume: base forecasts ˆyn(h) are unbiased: E[ˆyn(h)|y1, . . . , yn] = E[yn+h|y1, . . . , yn] Let ˆBn(h) be bottom level base forecasts with βn(h) = E[ˆBn(h)|y1, . . . , yn]. Then E[ˆyn(h)] = Sβn(h). We want the revised forecasts to be unbiased: E[˜yn(h)] = SPSβn(h) = Sβn(h). Result will hold provided SPS = S. True for bottom-up, but not for any top-down method or middle-out method. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 36
  • 105. General properties: bias ˜yn(h) = SPˆyn(h) Assume: base forecasts ˆyn(h) are unbiased: E[ˆyn(h)|y1, . . . , yn] = E[yn+h|y1, . . . , yn] Let ˆBn(h) be bottom level base forecasts with βn(h) = E[ˆBn(h)|y1, . . . , yn]. Then E[ˆyn(h)] = Sβn(h). We want the revised forecasts to be unbiased: E[˜yn(h)] = SPSβn(h) = Sβn(h). Result will hold provided SPS = S. True for bottom-up, but not for any top-down method or middle-out method. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 36
  • 106. General properties: variance ˜yn(h) = SPˆyn(h) Let variance of base forecasts ˆyn(h) be given by Σh = Var[ˆyn(h)|y1, . . . , yn] Then the variance of the revised forecasts is given by Var[˜yn(h)|y1, . . . , yn] = SPΣhP S . This is a general result for all existing methods. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 37
  • 107. General properties: variance ˜yn(h) = SPˆyn(h) Let variance of base forecasts ˆyn(h) be given by Σh = Var[ˆyn(h)|y1, . . . , yn] Then the variance of the revised forecasts is given by Var[˜yn(h)|y1, . . . , yn] = SPΣhP S . This is a general result for all existing methods. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 37
  • 108. General properties: variance ˜yn(h) = SPˆyn(h) Let variance of base forecasts ˆyn(h) be given by Σh = Var[ˆyn(h)|y1, . . . , yn] Then the variance of the revised forecasts is given by Var[˜yn(h)|y1, . . . , yn] = SPΣhP S . This is a general result for all existing methods. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 37
  • 109. BLUF via trace minimization Theorem For any P satisfying SPS = S, then min P = trace[SPΣhP S ] has solution P = (S Σ† hS)−1 S Σ† h. Σ† h is generalized inverse of Σh. Equivalent to GLS estimate of regression ˆyn(h) = Sβn(h) + εh where ε ∼ N(0, Σh). Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 38
  • 110. BLUF via trace minimization Theorem For any P satisfying SPS = S, then min P = trace[SPΣhP S ] has solution P = (S Σ† hS)−1 S Σ† h. Σ† h is generalized inverse of Σh. Equivalent to GLS estimate of regression ˆyn(h) = Sβn(h) + εh where ε ∼ N(0, Σh). Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 38
  • 111. BLUF via trace minimization Theorem For any P satisfying SPS = S, then min P = trace[SPΣhP S ] has solution P = (S Σ† hS)−1 S Σ† h. Σ† h is generalized inverse of Σh. Equivalent to GLS estimate of regression ˆyn(h) = Sβn(h) + εh where ε ∼ N(0, Σh). Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 38
  • 112. Optimal combination forecasts ˜yn(h) = SPˆyn(h) = S(S Σ† hS)−1 S Σ† hˆyn(h) Σ† h is generalized inverse of Σh. Var[˜yn(h)|y1, . . . , yn] = S(S Σ† hS)−1 S Problem: Σh hard to estimate. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 39
  • 113. Optimal combination forecasts ˜yn(h) = SPˆyn(h) = S(S Σ† hS)−1 S Σ† hˆyn(h) Initial forecasts Σ† h is generalized inverse of Σh. Var[˜yn(h)|y1, . . . , yn] = S(S Σ† hS)−1 S Problem: Σh hard to estimate. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 39
  • 114. Optimal combination forecasts ˜yn(h) = SPˆyn(h) = S(S Σ† hS)−1 S Σ† hˆyn(h) Revised forecasts Initial forecasts Σ† h is generalized inverse of Σh. Var[˜yn(h)|y1, . . . , yn] = S(S Σ† hS)−1 S Problem: Σh hard to estimate. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 39
  • 115. Optimal combination forecasts ˜yn(h) = SPˆyn(h) = S(S Σ† hS)−1 S Σ† hˆyn(h) Revised forecasts Initial forecasts Σ† h is generalized inverse of Σh. Var[˜yn(h)|y1, . . . , yn] = S(S Σ† hS)−1 S Problem: Σh hard to estimate. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 39
  • 116. Optimal combination forecasts ˜yn(h) = SPˆyn(h) = S(S Σ† hS)−1 S Σ† hˆyn(h) Revised forecasts Initial forecasts Σ† h is generalized inverse of Σh. Var[˜yn(h)|y1, . . . , yn] = S(S Σ† hS)−1 S Problem: Σh hard to estimate. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 39
  • 117. Optimal combination forecasts ˜yn(h) = SPˆyn(h) = S(S Σ† hS)−1 S Σ† hˆyn(h) Revised forecasts Initial forecasts Σ† h is generalized inverse of Σh. Var[˜yn(h)|y1, . . . , yn] = S(S Σ† hS)−1 S Problem: Σh hard to estimate. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 39
  • 118. Optimal combination forecasts ˜yn(h) = SPˆyn(h) = S(S Σ† hS)−1 S Σ† hˆyn(h) Revised forecasts Initial forecasts Σ† h is generalized inverse of Σh. Var[˜yn(h)|y1, . . . , yn] = S(S Σ† hS)−1 S Problem: Σh hard to estimate. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 39
  • 119. Optimal combination forecasts ˜yn(h) = S(S Σ† hS)−1 S Σ† hˆyn(h) Revised forecasts Base forecasts Solution 1: OLS Assume εh ≈ SεB,h where εB,h is the forecast error at bottom level. Then Σh ≈ SΩhS where Ωh = Var(εB,h). If Moore-Penrose generalized inverse used, then (S Σ† hS)−1 S Σ† h = (S S)−1 S . ˜yn(h) = S(S S)−1 S ˆyn(h) Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 40
  • 120. Optimal combination forecasts ˜yn(h) = S(S Σ† hS)−1 S Σ† hˆyn(h) Revised forecasts Base forecasts Solution 1: OLS Assume εh ≈ SεB,h where εB,h is the forecast error at bottom level. Then Σh ≈ SΩhS where Ωh = Var(εB,h). If Moore-Penrose generalized inverse used, then (S Σ† hS)−1 S Σ† h = (S S)−1 S . ˜yn(h) = S(S S)−1 S ˆyn(h) Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 40
  • 121. Optimal combination forecasts ˜yn(h) = S(S Σ† hS)−1 S Σ† hˆyn(h) Revised forecasts Base forecasts Solution 1: OLS Assume εh ≈ SεB,h where εB,h is the forecast error at bottom level. Then Σh ≈ SΩhS where Ωh = Var(εB,h). If Moore-Penrose generalized inverse used, then (S Σ† hS)−1 S Σ† h = (S S)−1 S . ˜yn(h) = S(S S)−1 S ˆyn(h) Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 40
  • 122. Optimal combination forecasts ˜yn(h) = S(S Σ† hS)−1 S Σ† hˆyn(h) Revised forecasts Base forecasts Solution 1: OLS Assume εh ≈ SεB,h where εB,h is the forecast error at bottom level. Then Σh ≈ SΩhS where Ωh = Var(εB,h). If Moore-Penrose generalized inverse used, then (S Σ† hS)−1 S Σ† h = (S S)−1 S . ˜yn(h) = S(S S)−1 S ˆyn(h) Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 40
  • 123. Optimal combination forecasts ˜yn(h) = S(S Σ† hS)−1 S Σ† hˆyn(h) Revised forecasts Base forecasts Solution 1: OLS Assume εh ≈ SεB,h where εB,h is the forecast error at bottom level. Then Σh ≈ SΩhS where Ωh = Var(εB,h). If Moore-Penrose generalized inverse used, then (S Σ† hS)−1 S Σ† h = (S S)−1 S . ˜yn(h) = S(S S)−1 S ˆyn(h) Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 40
  • 124. Optimal combination forecasts ˜yn(h) = S(S Σ† hS)−1 S Σ† hˆyn(h) Revised forecasts Base forecasts Solution 1: OLS Assume εh ≈ SεB,h where εB,h is the forecast error at bottom level. Then Σh ≈ SΩhS where Ωh = Var(εB,h). If Moore-Penrose generalized inverse used, then (S Σ† hS)−1 S Σ† h = (S S)−1 S . ˜yn(h) = S(S S)−1 S ˆyn(h) Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 40
  • 125. Optimal combination forecasts Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 41 ˜yn(h) = S(S S)−1 S ˆyn(h)Total A B C
  • 126. Optimal combination forecasts Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 41 ˜yn(h) = S(S S)−1 S ˆyn(h)Total A B C Weights: S(S S)−1 S =     0.75 0.25 0.25 0.25 0.25 0.75 −0.25 −0.25 0.25 −0.25 0.75 −0.25 0.25 −0.25 −0.25 0.75    
  • 127. Optimal combination forecasts Total A AA AB AC B BA BB BC C CA CB CC Weights: S(S S)−1 S =                       0.69 0.23 0.23 0.23 0.08 0.08 0.08 0.08 0.08 0.08 0.08 0.08 0.08 0.23 0.58 −0.17 −0.17 0.19 0.19 0.19 −0.06 −0.06 −0.06 −0.06 −0.06 −0.06 0.23 −0.17 0.58 −0.17 −0.06 −0.06 −0.06 0.19 0.19 0.19 −0.06 −0.06 −0.06 0.23 −0.17 −0.17 0.58 −0.06 −0.06 −0.06 −0.06 −0.06 −0.06 0.19 0.19 0.19 0.08 0.19 −0.06 −0.06 0.73 −0.27 −0.27 −0.02 −0.02 −0.02 −0.02 −0.02 −0.02 0.08 0.19 −0.06 −0.06 −0.27 0.73 −0.27 −0.02 −0.02 −0.02 −0.02 −0.02 −0.02 0.08 0.19 −0.06 −0.06 −0.27 −0.27 0.73 −0.02 −0.02 −0.02 −0.02 −0.02 −0.02 0.08 −0.06 0.19 −0.06 −0.02 −0.02 −0.02 0.73 −0.27 −0.27 −0.02 −0.02 −0.02 0.08 −0.06 0.19 −0.06 −0.02 −0.02 −0.02 −0.27 0.73 −0.27 −0.02 −0.02 −0.02 0.08 −0.06 0.19 −0.06 −0.02 −0.02 −0.02 −0.27 −0.27 0.73 −0.02 −0.02 −0.02 0.08 −0.06 −0.06 0.19 −0.02 −0.02 −0.02 −0.02 −0.02 −0.02 0.73 −0.27 −0.27 0.08 −0.06 −0.06 0.19 −0.02 −0.02 −0.02 −0.02 −0.02 −0.02 −0.27 0.73 −0.27 0.08 −0.06 −0.06 0.19 −0.02 −0.02 −0.02 −0.02 −0.02 −0.02 −0.27 −0.27 0.73                       Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 42
  • 128. Optimal combination forecasts Total A AA AB AC B BA BB BC C CA CB CC Weights: S(S S)−1 S =                       0.69 0.23 0.23 0.23 0.08 0.08 0.08 0.08 0.08 0.08 0.08 0.08 0.08 0.23 0.58 −0.17 −0.17 0.19 0.19 0.19 −0.06 −0.06 −0.06 −0.06 −0.06 −0.06 0.23 −0.17 0.58 −0.17 −0.06 −0.06 −0.06 0.19 0.19 0.19 −0.06 −0.06 −0.06 0.23 −0.17 −0.17 0.58 −0.06 −0.06 −0.06 −0.06 −0.06 −0.06 0.19 0.19 0.19 0.08 0.19 −0.06 −0.06 0.73 −0.27 −0.27 −0.02 −0.02 −0.02 −0.02 −0.02 −0.02 0.08 0.19 −0.06 −0.06 −0.27 0.73 −0.27 −0.02 −0.02 −0.02 −0.02 −0.02 −0.02 0.08 0.19 −0.06 −0.06 −0.27 −0.27 0.73 −0.02 −0.02 −0.02 −0.02 −0.02 −0.02 0.08 −0.06 0.19 −0.06 −0.02 −0.02 −0.02 0.73 −0.27 −0.27 −0.02 −0.02 −0.02 0.08 −0.06 0.19 −0.06 −0.02 −0.02 −0.02 −0.27 0.73 −0.27 −0.02 −0.02 −0.02 0.08 −0.06 0.19 −0.06 −0.02 −0.02 −0.02 −0.27 −0.27 0.73 −0.02 −0.02 −0.02 0.08 −0.06 −0.06 0.19 −0.02 −0.02 −0.02 −0.02 −0.02 −0.02 0.73 −0.27 −0.27 0.08 −0.06 −0.06 0.19 −0.02 −0.02 −0.02 −0.02 −0.02 −0.02 −0.27 0.73 −0.27 0.08 −0.06 −0.06 0.19 −0.02 −0.02 −0.02 −0.02 −0.02 −0.02 −0.27 −0.27 0.73                       Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 42
  • 129. Features Covariates can be included in initial forecasts. Adjustments can be made to initial forecasts at any level. Very simple and flexible method. Can work with any hierarchical or grouped time series. SPS = S so reconciled forcasts are unbiased. Conceptually easy to implement: OLS on base forecasts. Weights are independent of the data and of the covariance structure of the hierarchy. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 43
  • 130. Features Covariates can be included in initial forecasts. Adjustments can be made to initial forecasts at any level. Very simple and flexible method. Can work with any hierarchical or grouped time series. SPS = S so reconciled forcasts are unbiased. Conceptually easy to implement: OLS on base forecasts. Weights are independent of the data and of the covariance structure of the hierarchy. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 43
  • 131. Features Covariates can be included in initial forecasts. Adjustments can be made to initial forecasts at any level. Very simple and flexible method. Can work with any hierarchical or grouped time series. SPS = S so reconciled forcasts are unbiased. Conceptually easy to implement: OLS on base forecasts. Weights are independent of the data and of the covariance structure of the hierarchy. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 43
  • 132. Features Covariates can be included in initial forecasts. Adjustments can be made to initial forecasts at any level. Very simple and flexible method. Can work with any hierarchical or grouped time series. SPS = S so reconciled forcasts are unbiased. Conceptually easy to implement: OLS on base forecasts. Weights are independent of the data and of the covariance structure of the hierarchy. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 43
  • 133. Features Covariates can be included in initial forecasts. Adjustments can be made to initial forecasts at any level. Very simple and flexible method. Can work with any hierarchical or grouped time series. SPS = S so reconciled forcasts are unbiased. Conceptually easy to implement: OLS on base forecasts. Weights are independent of the data and of the covariance structure of the hierarchy. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 43
  • 134. Features Covariates can be included in initial forecasts. Adjustments can be made to initial forecasts at any level. Very simple and flexible method. Can work with any hierarchical or grouped time series. SPS = S so reconciled forcasts are unbiased. Conceptually easy to implement: OLS on base forecasts. Weights are independent of the data and of the covariance structure of the hierarchy. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 43
  • 135. Challenges Computational difficulties in big hierarchies due to size of the S matrix and singular behavior of (S S). Need to estimate covariance matrix to produce prediction intervals. Ignores covariance matrix in computing point forecasts. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 44 ˜yn(h) = S(S S)−1 S ˆyn(h)
  • 136. Challenges Computational difficulties in big hierarchies due to size of the S matrix and singular behavior of (S S). Need to estimate covariance matrix to produce prediction intervals. Ignores covariance matrix in computing point forecasts. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 44 ˜yn(h) = S(S S)−1 S ˆyn(h)
  • 137. Challenges Computational difficulties in big hierarchies due to size of the S matrix and singular behavior of (S S). Need to estimate covariance matrix to produce prediction intervals. Ignores covariance matrix in computing point forecasts. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 44 ˜yn(h) = S(S S)−1 S ˆyn(h)
  • 138. Optimal combination forecasts Solution 1: OLS Approximate Σ† 1 by cI. Solution 2: Rescaling Suppose we approximate Σ1 by its diagonal. Let Λ = diagonal Σ1 −1 contain inverse one-step forecast variances. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 45 ˜yn(h) = S(S Σ† 1S)−1 S Σ† 1ˆyn(h) ˜yn(h) = S(SΛS)−1 SΛˆyn(h)
  • 139. Optimal combination forecasts Solution 1: OLS Approximate Σ† 1 by cI. Solution 2: Rescaling Suppose we approximate Σ1 by its diagonal. Let Λ = diagonal Σ1 −1 contain inverse one-step forecast variances. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 45 ˜yn(h) = S(S Σ† 1S)−1 S Σ† 1ˆyn(h) ˜yn(h) = S(SΛS)−1 SΛˆyn(h)
  • 140. Optimal combination forecasts Solution 1: OLS Approximate Σ† 1 by cI. Solution 2: Rescaling Suppose we approximate Σ1 by its diagonal. Let Λ = diagonal Σ1 −1 contain inverse one-step forecast variances. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 45 ˜yn(h) = S(S Σ† 1S)−1 S Σ† 1ˆyn(h) ˜yn(h) = S(SΛS)−1 SΛˆyn(h)
  • 141. Optimal combination forecasts Solution 1: OLS Approximate Σ† 1 by cI. Solution 2: Rescaling Suppose we approximate Σ1 by its diagonal. Let Λ = diagonal Σ1 −1 contain inverse one-step forecast variances. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 45 ˜yn(h) = S(S Σ† 1S)−1 S Σ† 1ˆyn(h) ˜yn(h) = S(SΛS)−1 SΛˆyn(h)
  • 142. Optimal combination forecasts Solution 1: OLS Approximate Σ† 1 by cI. Solution 2: Rescaling Suppose we approximate Σ1 by its diagonal. Let Λ = diagonal Σ1 −1 contain inverse one-step forecast variances. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 45 ˜yn(h) = S(S Σ† 1S)−1 S Σ† 1ˆyn(h) ˜yn(h) = S(SΛS)−1 SΛˆyn(h)
  • 143. Optimal reconciled forecasts ˜yn(h) = S ˆβn(h) = S(S ΛS)−1 S Λˆyn(h) Easy to estimate, and places weight where we have best forecasts. Ignores covariances. For large numbers of time series, we need to do calculation without explicitly forming S or (SΛS)−1 or SΛ. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 46
  • 144. Optimal reconciled forecasts ˜yn(h) = S ˆβn(h) = S(S ΛS)−1 S Λˆyn(h) Initial forecasts Easy to estimate, and places weight where we have best forecasts. Ignores covariances. For large numbers of time series, we need to do calculation without explicitly forming S or (SΛS)−1 or SΛ. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 46
  • 145. Optimal reconciled forecasts ˜yn(h) = S ˆβn(h) = S(S ΛS)−1 S Λˆyn(h) Revised forecasts Initial forecasts Easy to estimate, and places weight where we have best forecasts. Ignores covariances. For large numbers of time series, we need to do calculation without explicitly forming S or (SΛS)−1 or SΛ. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 46
  • 146. Optimal reconciled forecasts ˜yn(h) = S ˆβn(h) = S(S ΛS)−1 S Λˆyn(h) Revised forecasts Initial forecasts Easy to estimate, and places weight where we have best forecasts. Ignores covariances. For large numbers of time series, we need to do calculation without explicitly forming S or (SΛS)−1 or SΛ. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 46
  • 147. Optimal reconciled forecasts ˜yn(h) = S ˆβn(h) = S(S ΛS)−1 S Λˆyn(h) Revised forecasts Initial forecasts Easy to estimate, and places weight where we have best forecasts. Ignores covariances. For large numbers of time series, we need to do calculation without explicitly forming S or (SΛS)−1 or SΛ. Visualising and forecasting big time series data BLUF: Best Linear Unbiased Forecasts 46
  • 148. Outline 1 Examples of big time series 2 Time series visualisation 3 BLUF: Best Linear Unbiased Forecasts 4 Application: Australian tourism 5 Application: Australian labour market 6 Fast computation tricks 7 hts package for R 8 References Visualising and forecasting big time series data Application: Australian tourism 47
  • 149. Australian tourism Visualising and forecasting big time series data Application: Australian tourism 48
  • 150. Australian tourism Visualising and forecasting big time series data Application: Australian tourism 48 Hierarchy: States (7) Zones (27) Regions (82)
  • 151. Australian tourism Visualising and forecasting big time series data Application: Australian tourism 48 Hierarchy: States (7) Zones (27) Regions (82) Base forecasts ETS (exponential smoothing) models
  • 152. Base forecasts Visualising and forecasting big time series data Application: Australian tourism 49 Domestic tourism forecasts: Total Year Visitornights 1998 2000 2002 2004 2006 2008 600006500070000750008000085000
  • 153. Base forecasts Visualising and forecasting big time series data Application: Australian tourism 49 Domestic tourism forecasts: NSW Year Visitornights 1998 2000 2002 2004 2006 2008 18000220002600030000
  • 154. Base forecasts Visualising and forecasting big time series data Application: Australian tourism 49 Domestic tourism forecasts: VIC Year Visitornights 1998 2000 2002 2004 2006 2008 1000012000140001600018000
  • 155. Base forecasts Visualising and forecasting big time series data Application: Australian tourism 49 Domestic tourism forecasts: Nth.Coast.NSW Year Visitornights 1998 2000 2002 2004 2006 2008 50006000700080009000
  • 156. Base forecasts Visualising and forecasting big time series data Application: Australian tourism 49 Domestic tourism forecasts: Metro.QLD Year Visitornights 1998 2000 2002 2004 2006 2008 800090001100013000
  • 157. Base forecasts Visualising and forecasting big time series data Application: Australian tourism 49 Domestic tourism forecasts: Sth.WA Year Visitornights 1998 2000 2002 2004 2006 2008 400600800100012001400
  • 158. Base forecasts Visualising and forecasting big time series data Application: Australian tourism 49 Domestic tourism forecasts: X201.Melbourne Year Visitornights 1998 2000 2002 2004 2006 2008 40004500500055006000
  • 159. Base forecasts Visualising and forecasting big time series data Application: Australian tourism 49 Domestic tourism forecasts: X402.Murraylands Year Visitornights 1998 2000 2002 2004 2006 2008 0100200300
  • 160. Base forecasts Visualising and forecasting big time series data Application: Australian tourism 49 Domestic tourism forecasts: X809.Daly Year Visitornights 1998 2000 2002 2004 2006 2008 020406080100
  • 161. Reconciled forecasts Visualising and forecasting big time series data Application: Australian tourism 50 Total 2000 2005 2010 650008000095000
  • 162. Reconciled forecasts Visualising and forecasting big time series data Application: Australian tourism 50 NSW 2000 2005 2010 180002400030000 VIC 2000 2005 2010 100001400018000 QLD 2000 2005 2010 1400020000 Other 2000 2005 2010 1800024000
  • 163. Reconciled forecasts Visualising and forecasting big time series data Application: Australian tourism 50 Sydney 2000 2005 2010 40007000 OtherNSW 2000 2005 2010 1400022000 Melbourne 2000 2005 2010 40005000 OtherVIC 2000 2005 2010 600012000 GCandBrisbane 2000 2005 2010 60009000 OtherQLD 2000 2005 2010 600012000 Capitalcities 2000 2005 2010 1400020000 Other 2000 2005 2010 55007500
  • 164. Forecast evaluation Select models using all observations; Re-estimate models using first 12 observations and generate 1- to 8-step-ahead forecasts; Increase sample size one observation at a time, re-estimate models, generate forecasts until the end of the sample; In total 24 1-step-ahead, 23 2-steps-ahead, up to 17 8-steps-ahead for forecast evaluation. Visualising and forecasting big time series data Application: Australian tourism 51
  • 165. Forecast evaluation Select models using all observations; Re-estimate models using first 12 observations and generate 1- to 8-step-ahead forecasts; Increase sample size one observation at a time, re-estimate models, generate forecasts until the end of the sample; In total 24 1-step-ahead, 23 2-steps-ahead, up to 17 8-steps-ahead for forecast evaluation. Visualising and forecasting big time series data Application: Australian tourism 51
  • 166. Forecast evaluation Select models using all observations; Re-estimate models using first 12 observations and generate 1- to 8-step-ahead forecasts; Increase sample size one observation at a time, re-estimate models, generate forecasts until the end of the sample; In total 24 1-step-ahead, 23 2-steps-ahead, up to 17 8-steps-ahead for forecast evaluation. Visualising and forecasting big time series data Application: Australian tourism 51
  • 167. Forecast evaluation Select models using all observations; Re-estimate models using first 12 observations and generate 1- to 8-step-ahead forecasts; Increase sample size one observation at a time, re-estimate models, generate forecasts until the end of the sample; In total 24 1-step-ahead, 23 2-steps-ahead, up to 17 8-steps-ahead for forecast evaluation. Visualising and forecasting big time series data Application: Australian tourism 51
  • 168. Hierarchy: states, zones, regions MAPE h = 1 h = 2 h = 4 h = 6 h = 8 Average Top Level: Australia Bottom-up 3.79 3.58 4.01 4.55 4.24 4.06 OLS 3.83 3.66 3.88 4.19 4.25 3.94 Scaling (st. dev.) 3.68 3.56 3.97 4.57 4.25 4.04 Level: States Bottom-up 10.70 10.52 10.85 11.46 11.27 11.03 OLS 11.07 10.58 11.13 11.62 12.21 11.35 Scaling (st. dev.) 10.44 10.17 10.47 10.97 10.98 10.67 Level: Zones Bottom-up 14.99 14.97 14.98 15.69 15.65 15.32 OLS 15.16 15.06 15.27 15.74 16.15 15.48 Scaling (st. dev.) 14.63 14.62 14.68 15.17 15.25 14.94 Bottom Level: Regions Bottom-up 33.12 32.54 32.26 33.74 33.96 33.18 OLS 35.89 33.86 34.26 36.06 37.49 35.43 Scaling (st. dev.) 31.68 31.22 31.08 32.41 32.77 31.89 Visualising and forecasting big time series data Application: Australian tourism 52
  • 169. Outline 1 Examples of big time series 2 Time series visualisation 3 BLUF: Best Linear Unbiased Forecasts 4 Application: Australian tourism 5 Application: Australian labour market 6 Fast computation tricks 7 hts package for R 8 References Visualising and forecasting big time series data Application: Australian labour market 53
  • 170. ANZSCO Australia and New Zealand Standard Classification of Occupations 8 major groups 43 sub-major groups 97 minor groups – 359 unit groups * 1023 occupations Example: statistician 2 Professionals 22 Business, Human Resource and Marketing Professionals 224 Information and Organisation Professionals 2241 Actuaries, Mathematicians and Statisticians 224113 Statistician Visualising and forecasting big time series data Application: Australian labour market 54
  • 171. ANZSCO Australia and New Zealand Standard Classification of Occupations 8 major groups 43 sub-major groups 97 minor groups – 359 unit groups * 1023 occupations Example: statistician 2 Professionals 22 Business, Human Resource and Marketing Professionals 224 Information and Organisation Professionals 2241 Actuaries, Mathematicians and Statisticians 224113 Statistician Visualising and forecasting big time series data Application: Australian labour market 54
  • 172. Australian Labour Market data Visualising and forecasting big time series data Application: Australian labour market 55 Time Level0 7000900011000 Time Level1 5001000150020002500 1. Managers 2. Professionals 3. Technicians and trade workers 4. Community and personal services workers 5. Clerical and administrative workers 6. Sales workers 7. Machinery operators and drivers 8. Labourers Time Level2 100200300400500600700 Time Level3 100200300400500600700 Time Level4 1990 1995 2000 2005 2010 100200300400500
  • 173. Australian Labour Market data Visualising and forecasting big time series data Application: Australian labour market 55 Time Level0 7000900011000 Time Level1 5001000150020002500 1. Managers 2. Professionals 3. Technicians and trade workers 4. Community and personal services workers 5. Clerical and administrative workers 6. Sales workers 7. Machinery operators and drivers 8. Labourers Time Level2 100200300400500600700 Time Level3 100200300400500600700 Time Level4 1990 1995 2000 2005 2010 100200300400500 Lower three panels show largest sub-groups at each level.
  • 174. Australian Labour Market data Visualising and forecasting big time series data Application: Australian labour market 55 Time Level0 7000900011000 Time Level1 5001000150020002500 1. Managers 2. Professionals 3. Technicians and trade workers 4. Community and personal services workers 5. Clerical and administrative workers 6. Sales workers 7. Machinery operators and drivers 8. Labourers Time Level2 100200300400500600700 Time Level3 100200300400500600700 Time Level4 1990 1995 2000 2005 2010 100200300400500 Time Level0 10800112001160012000 Base forecasts Reconciled forecasts Time Level1 680700720740760780800 Time Level2 140150160170180190200 Time Level3 140150160170180 Year Level4 2010 2011 2012 2013 2014 2015 120130140150160
  • 175. Australian Labour Market data Visualising and forecasting big time series data Application: Australian labour market 55 Time Level0 7000900011000 Time Level1 5001000150020002500 1. Managers 2. Professionals 3. Technicians and trade workers 4. Community and personal services workers 5. Clerical and administrative workers 6. Sales workers 7. Machinery operators and drivers 8. Labourers Time Level2 100200300400500600700 Time Level3 100200300400500600700 Time Level4 1990 1995 2000 2005 2010 100200300400500 Time Level0 10800112001160012000 Base forecasts Reconciled forecasts Time Level1 680700720740760780800 Time Level2 140150160170180190200 Time Level3 140150160170180 Year Level4 2010 2011 2012 2013 2014 2015 120130140150160 Base forecasts from auto.arima() Largest changes shown for each level
  • 176. Forecast evaluation (rolling origin) RMSE h = 1 h = 2 h = 3 h = 4 h = 5 h = 6 h = 7 h = 8 Average Top level Bottom-up 74.71 102.02 121.70 131.17 147.08 157.12 169.60 178.93 135.29 OLS 52.20 77.77 101.50 119.03 138.27 150.75 160.04 166.38 120.74 WLS 61.77 86.32 107.26 119.33 137.01 146.88 156.71 162.38 122.21 Level 1 Bottom-up 21.59 27.33 30.81 32.94 35.45 37.10 39.00 40.51 33.09 OLS 21.89 28.55 32.74 35.58 38.82 41.24 43.34 45.49 35.96 WLS 20.58 26.19 29.71 31.84 34.36 35.89 37.53 38.86 31.87 Level 2 Bottom-up 8.78 10.72 11.79 12.42 13.13 13.61 14.14 14.65 12.40 OLS 9.02 11.19 12.34 13.04 13.92 14.56 15.17 15.77 13.13 WLS 8.58 10.48 11.54 12.15 12.88 13.36 13.87 14.36 12.15 Level 3 Bottom-up 5.44 6.57 7.17 7.53 7.94 8.27 8.60 8.89 7.55 OLS 5.55 6.78 7.42 7.81 8.29 8.68 9.04 9.37 7.87 WLS 5.35 6.46 7.06 7.42 7.84 8.17 8.48 8.76 7.44 Bottom Level Bottom-up 2.35 2.79 3.02 3.15 3.29 3.42 3.54 3.65 3.15 OLS 2.40 2.86 3.10 3.24 3.41 3.55 3.68 3.80 3.25 WLS 2.34 2.77 2.99 3.12 3.27 3.40 3.52 3.63 3.13 Visualising and forecasting big time series data Application: Australian labour market 56
  • 177. Outline 1 Examples of big time series 2 Time series visualisation 3 BLUF: Best Linear Unbiased Forecasts 4 Application: Australian tourism 5 Application: Australian labour market 6 Fast computation tricks 7 hts package for R 8 References Visualising and forecasting big time series data Fast computation tricks 57
  • 178. Fast computation: hierarchical data Total A AX AY AZ B BX BY BZ C CX CY CZ yt =             Yt YA,t YB,t YC,t YAX,t YAY,t YAZ,t YBX,t YBY,t YBZ,t YCX,t YCY,t YCZ,t             =             1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1             S        YAX,t YAY,t YAZ,t YBX,t YBY,t YBZ,t YCX,t YCY,t YCZ,t        Bt Visualising and forecasting big time series data Fast computation tricks 58 yt = SBt
  • 179. Fast computation: hierarchical data Total A AX AY AZ B BX BY BZ C CX CY CZ yt =             Yt YA,t YAX,t YAY,t YAZ,t YB,t YBX,t YBY,t YBZ,t YC,t YCX,t YCY,t YCZ,t             =             1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1             S        YAX,t YAY,t YAZ,t YBX,t YBY,t YBZ,t YCX,t YCY,t YCZ,t        Bt Visualising and forecasting big time series data Fast computation tricks 59 yt = SBt
  • 180. Fast computation: hierarchies Think of the hierarchy as a tree of trees: Total T1 T2 . . . TK Then the summing matrix contains k smaller summing matrices: S =       1n1 1n2 · · · 1nK S1 0 · · · 0 0 S2 · · · 0 ... ... ... ... 0 0 · · · SK       where 1n is an n-vector of ones and tree Ti has ni terminal nodes. Visualising and forecasting big time series data Fast computation tricks 60
  • 181. Fast computation: hierarchies Think of the hierarchy as a tree of trees: Total T1 T2 . . . TK Then the summing matrix contains k smaller summing matrices: S =       1n1 1n2 · · · 1nK S1 0 · · · 0 0 S2 · · · 0 ... ... ... ... 0 0 · · · SK       where 1n is an n-vector of ones and tree Ti has ni terminal nodes. Visualising and forecasting big time series data Fast computation tricks 60
  • 182. Fast computation: hierarchies SΛS =     S1Λ1S1 0 · · · 0 0 S2Λ2S2 · · · 0 ... ... ... ... 0 0 · · · SKΛKSK    +λ0 Jn λ0 is the top left element of Λ; Λk is a block of Λ, corresponding to tree Tk; Jn is a matrix of ones; n = k nk. Now apply the Sherman-Morrison formula . . . Visualising and forecasting big time series data Fast computation tricks 61
  • 183. Fast computation: hierarchies SΛS =     S1Λ1S1 0 · · · 0 0 S2Λ2S2 · · · 0 ... ... ... ... 0 0 · · · SKΛKSK    +λ0 Jn λ0 is the top left element of Λ; Λk is a block of Λ, corresponding to tree Tk; Jn is a matrix of ones; n = k nk. Now apply the Sherman-Morrison formula . . . Visualising and forecasting big time series data Fast computation tricks 61
  • 184. Fast computation: hierarchies (SΛS)−1 =      (S1Λ1S1)−1 0 · · · 0 0 (S2Λ2S2)−1 · · · 0 ... ... ... ... 0 0 · · · (SKΛKSK)−1      −cS0 S0 can be partitioned into K2 blocks, with the (k, ) block (of dimension nk × n ) being (SkΛkSk)−1 Jnk,n (S Λ S )−1 Jnk,n is a nk × n matrix of ones. c−1 = λ−1 0 + k 1nk (SkΛkSk)−1 1nk . Each SkΛkSk can be inverted similarly. SΛy can also be computed recursively. Visualising and forecasting big time series data Fast computation tricks 62
  • 185. Fast computation: hierarchies (SΛS)−1 =      (S1Λ1S1)−1 0 · · · 0 0 (S2Λ2S2)−1 · · · 0 ... ... ... ... 0 0 · · · (SKΛKSK)−1      −cS0 S0 can be partitioned into K2 blocks, with the (k, ) block (of dimension nk × n ) being (SkΛkSk)−1 Jnk,n (S Λ S )−1 Jnk,n is a nk × n matrix of ones. c−1 = λ−1 0 + k 1nk (SkΛkSk)−1 1nk . Each SkΛkSk can be inverted similarly. SΛy can also be computed recursively. Visualising and forecasting big time series data Fast computation tricks 62 The recursive calculations can be done in such a way that we never store any of the large matrices involved.
  • 186. Fast computation When the time series are not strictly hierarchical and have more than two grouping variables: Use sparse matrix storage and arithmetic. Use iterative approximation for inverting large sparse matrices. Paige & Saunders (1982) ACM Trans. Math. Software Visualising and forecasting big time series data Fast computation tricks 63
  • 187. Fast computation When the time series are not strictly hierarchical and have more than two grouping variables: Use sparse matrix storage and arithmetic. Use iterative approximation for inverting large sparse matrices. Paige & Saunders (1982) ACM Trans. Math. Software Visualising and forecasting big time series data Fast computation tricks 63
  • 188. Fast computation When the time series are not strictly hierarchical and have more than two grouping variables: Use sparse matrix storage and arithmetic. Use iterative approximation for inverting large sparse matrices. Paige & Saunders (1982) ACM Trans. Math. Software Visualising and forecasting big time series data Fast computation tricks 63
  • 189. Outline 1 Examples of big time series 2 Time series visualisation 3 BLUF: Best Linear Unbiased Forecasts 4 Application: Australian tourism 5 Application: Australian labour market 6 Fast computation tricks 7 hts package for R 8 References Visualising and forecasting big time series data hts package for R 64
  • 190. hts package for R Visualising and forecasting big time series data hts package for R 65 hts: Hierarchical and grouped time series Methods for analysing and forecasting hierarchical and grouped time series Version: 4.3 Depends: forecast (≥ 5.0) Imports: SparseM, parallel, utils Published: 2014-06-10 Author: Rob J Hyndman, Earo Wang and Alan Lee Maintainer: Rob J Hyndman <Rob.Hyndman at monash.edu> BugReports: https://github.com/robjhyndman/hts/issues License: GPL (≥ 2)
  • 191. Example using R library(hts) # bts is a matrix containing the bottom level time series # nodes describes the hierarchical structure y <- hts(bts, nodes=list(2, c(3,2))) Visualising and forecasting big time series data hts package for R 66
  • 192. Example using R library(hts) # bts is a matrix containing the bottom level time series # nodes describes the hierarchical structure y <- hts(bts, nodes=list(2, c(3,2))) Visualising and forecasting big time series data hts package for R 66 Total A AX AY AZ B BX BY
  • 193. Example using R library(hts) # bts is a matrix containing the bottom level time series # nodes describes the hierarchical structure y <- hts(bts, nodes=list(2, c(3,2))) # Forecast 10-step-ahead using WLS combination method # ETS used for each series by default fc <- forecast(y, h=10) Visualising and forecasting big time series data hts package for R 67
  • 194. forecast.gts function Usage forecast(object, h, method = c("comb", "bu", "mo", "tdgsf", "tdgsa", "tdfp"), fmethod = c("ets", "rw", "arima"), weights = c("sd", "none", "nseries"), positive = FALSE, parallel = FALSE, num.cores = 2, ...) Arguments object Hierarchical time series object of class gts. h Forecast horizon method Method for distributing forecasts within the hierarchy. fmethod Forecasting method to use positive If TRUE, forecasts are forced to be strictly positive weights Weights used for "optimal combination" method. When weights = "sd", it takes account of the standard deviation of forecasts. parallel If TRUE, allow parallel processing num.cores If parallel = TRUE, specify how many cores are going to be used Visualising and forecasting big time series data hts package for R 68
  • 195. Outline 1 Examples of big time series 2 Time series visualisation 3 BLUF: Best Linear Unbiased Forecasts 4 Application: Australian tourism 5 Application: Australian labour market 6 Fast computation tricks 7 hts package for R 8 References Visualising and forecasting big time series data References 69
  • 196. References RJ Hyndman, RA Ahmed, G Athanasopoulos, and HL Shang (2011). “Optimal combination forecasts for hierarchical time series”. Computational statistics & data analysis 55(9), 2579–2589. RJ Hyndman, AJ Lee, and E Wang (2014). Fast computation of reconciled forecasts for hierarchical and grouped time series. Working paper 17/14. Department of Econometrics & Business Statistics, Monash University RJ Hyndman, AJ Lee, and E Wang (2014). hts: Hierarchical and grouped time series. cran.r-project.org/package=hts. RJ Hyndman and G Athanasopoulos (2014). Forecasting: principles and practice. OTexts. OTexts.org/fpp/. Visualising and forecasting big time series data References 70
  • 197. References RJ Hyndman, RA Ahmed, G Athanasopoulos, and HL Shang (2011). “Optimal combination forecasts for hierarchical time series”. Computational statistics & data analysis 55(9), 2579–2589. RJ Hyndman, AJ Lee, and E Wang (2014). Fast computation of reconciled forecasts for hierarchical and grouped time series. Working paper 17/14. Department of Econometrics & Business Statistics, Monash University RJ Hyndman, AJ Lee, and E Wang (2014). hts: Hierarchical and grouped time series. cran.r-project.org/package=hts. RJ Hyndman and G Athanasopoulos (2014). Forecasting: principles and practice. OTexts. OTexts.org/fpp/. Visualising and forecasting big time series data References 70 ¯ Papers and R code: robjhyndman.com ¯ Email: Rob.Hyndman@monash.edu