learning granger causality for multivariate time series

20
Learning Granger causality for multivariate time series using state-space models Anawat Nartkulpat ID 5930562521 Advisor: Assist. Prof. Jitkomut Songsiri Department of Electrical Engineering, Faculty of Engineering Chulalongkorn University Senior Project Proposal 2102490 Year 2019 1

Upload: others

Post on 05-Jun-2022

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Learning Granger causality for multivariate time series

Learning Granger causality for multivariate time series using state-space models

Anawat Nartkulpat ID 5930562521

Advisor: Assist. Prof. Jitkomut Songsiri

Department of Electrical Engineering, Faculty of Engineering Chulalongkorn University

Senior Project Proposal 2102490 Year 2019

1

Page 2: Learning Granger causality for multivariate time series

Introduction

๐‘ฆ1

๐‘ฆ2

๐‘ฆ3

๐‘ฆ4 ๐‘ฆ5

Time series data

Causality pattern

2

Page 3: Learning Granger causality for multivariate time series

Model estimation

Computing Granger causality

Significance test/classification of zero causality

- Non-Iinear models - Linear models

- VAR - VARMA - State-space

๐‘ฆ1

๐‘ฆ2

๐‘ฆ3

๐‘ฆ4 ๐‘ฆ5

- Clustering methods - GMM [1]

- Statistical methods - Parametric - Non-parametric

- Permutation test - Bootstraps

Introduction

3

Page 4: Learning Granger causality for multivariate time series

Objectives

โ€ข To develop a scheme for classifying the zero patterns of the Granger causality of state-space models using the permutation test.

โ€ข To compare the performance of the permutation test with the Gaussian mixture models method in classification of zero and non-zero entries of Granger causality matrix obtained from state-space model

4

Page 5: Learning Granger causality for multivariate time series

Methodology

Figure 1. The scheme for learning GC pattern using state-space models.

Subspace identification

GC estimation

Estimated state-space matrices

๐ด , ๐ถ , ๐‘Š , ๐‘‰ , ๐‘†

Computing permutation distributions

under ๐ป0: ๐น๐‘–๐‘— = 0

Cumulative permutation distribution ฮฆ๐‘–๐‘—(๐‘ฅ)

๐น

Significance test and

thresholding

GC zero pattern

Time series data

5

Page 6: Learning Granger causality for multivariate time series

Ground truth model

Generate a VAR model with sparse

GC matrix

Generate a diagonal filter

A State-space model

๐‘ฅ ๐‘ก + 1 = ๐ด๐‘ฅ ๐‘ก + ๐ต๐‘ค ๐‘ก ๐‘ฆ ๐‘ก = ๐ถ๐‘ฅ ๐‘ก

equivalent to ๐บ ๐‘ง ๐ดโˆ’1(๐‘ง)

ฮฃ๐‘ค

๐‘ฆ ๐‘ก ๐‘ก=1๐‘ ๐บ ๐‘ง

๐ดโˆ’1 ๐‘ง

Figure 2. The scheme for generating ground truth model and time series data.

6

Time series data

Page 7: Learning Granger causality for multivariate time series

Subspace identification

We consider estimating parameters ๐ด, ๐ถ, ๐‘Š, ๐‘‰, ๐‘† of a stochastic state-space model ๐‘ฅ ๐‘ก + 1 = ๐ด๐‘ฅ ๐‘ก + ๐‘ค ๐‘ก ๐‘ฆ ๐‘ก = ๐ถ๐‘ฅ ๐‘ก + ๐‘ฃ(๐‘ก)

This method is based on orthogonal projection. Suppose that the outputs ๐‘Œ is known, it was shown in [2] that

๐’ช๐‘– โ‰ก ๐‘Œ๐‘–|2๐‘–โˆ’1 /๐‘Œ0|๐‘–โˆ’1 = ๐‘Œ๐‘“/๐‘Œ๐‘ (Projecting the future outputs onto the past output space)

๐’ช๐‘– = ฮ“๐‘–๐‘‹ ๐‘– โŸน ๐‘‹ ๐‘– = ฮ“๐‘–โ€ ๐’ช๐‘– and ๐‘‹ ๐‘–+1 = ฮ“๐‘–โˆ’1

โ€  ๐’ช๐‘–โˆ’1

๐‘‹ ๐‘–+1

๐‘Œ๐‘–|๐‘–=

๐ด๐ถ

๐‘‹ ๐‘– +๐œŒ๐‘ค

๐œŒ๐‘ฃ โŸน

๐ด

๐ถ =

๐‘‹ ๐‘–+1

๐‘Œ๐‘–|๐‘–๐‘‹ ๐‘–

โ€ 

๐‘Š ๐‘†

๐‘† ๐‘‡ ๐‘‰ =

1

๐‘—

๐œŒ๐‘ค

๐œŒ๐‘ฃ

๐œŒ๐‘ค

๐œŒ๐‘ฃ

๐‘‡

7

Page 8: Learning Granger causality for multivariate time series

Granger causality of state-space model

The measure of the Granger causality from ๐‘ฆ๐‘— to ๐‘ฆ๐‘– is defined by

๐น๐‘–๐‘— = logฮฃ๐‘–๐‘–

๐‘…

ฮฃ๐‘–๐‘–

where ฮฃ๐‘–๐‘– is the covariance of the prediction error given all other ๐‘ฆ๐‘˜ and ฮฃ๐‘–๐‘–๐‘… is the

covariance of the prediction error given all other ๐‘ฆ๐‘˜ except ๐‘ฆ๐‘— [3]. Together with this definition, we can define a Granger causality matrix

๐น =

๐น11 ๐น12 โ‹ฏ ๐น1๐‘›

๐น21 ๐น22 โ‹ฏ ๐น๐‘›2

โ‹ฎ โ‹ฎ โ‹ฑ โ‹ฎ๐น๐‘›1 ๐น๐‘›2 โ‹ฏ ๐น๐‘›๐‘›

8

Page 9: Learning Granger causality for multivariate time series

For a state-space model ๐‘ฅ ๐‘ก + 1 = ๐ด๐‘ฅ ๐‘ก + ๐‘ค ๐‘ก ๐‘ฆ ๐‘ก = ๐ถ๐‘ฅ ๐‘ก + ๐‘ฃ(๐‘ก)

where ๐‘ฌ๐‘ค๐‘ฃ

๐‘ค๐‘ฃ

๐‘ป=

๐‘Š ๐‘†๐‘†๐‘‡ ๐‘‰

, we consider the reduced model with

๐‘ฅ ๐‘ก + 1 = ๐ด๐‘ฅ ๐‘ก + ๐‘ค ๐‘ก ๐‘ฆ๐‘… ๐‘ก = ๐ถ๐‘…๐‘ฅ ๐‘ก + ๐‘ฃ๐‘…(๐‘ก)

where ๐‘ฆ๐‘… is ๐‘ฆ without ๐‘ฆ๐‘— and ๐ถ๐‘… is ๐ถ without ๐‘—๐‘กโ„Ž row.

We have ฮฃ = CPCT + V and ฮฃ๐‘… = ๐ถ๐‘…๐‘ƒ๐‘… ๐ถ๐‘… ๐‘‡ + ๐‘‰๐‘… where ๐‘‰๐‘… is V without ๐‘—๐‘กโ„Ž row and column and P is solved from DARE [1]

๐‘ƒ = ๐ด๐‘ƒ๐ด๐‘‡ โˆ’ ๐ด๐‘ƒ๐ถ๐‘‡ + ๐‘† ๐ถ๐‘ƒ๐ถ๐‘‡ + ๐‘‰ โˆ’1 ๐ถ๐‘ƒ๐ด๐‘‡ + ๐‘†๐‘‡ + ๐‘Š

9

Granger causality of state-space model

Page 10: Learning Granger causality for multivariate time series

Permutation test

- The distribution of ๐น๐‘–๐‘— is unknown

- The null hypothesis ๐ป0: ๐น๐‘–๐‘— = 0 is to be tested

Justification: Under the true null hypothesis, ๐‘ฆ๐‘–

is not Granger-caused by ๐‘ฆ๐‘—, so rearranging data

in channel ๐‘ฆ๐‘— does not change the outcome.

So, we may form a distribution of ๐น๐‘–๐‘— under ๐ป0 empirically from the permutations of data [4].

Figure 3. One of the possible permutations.

Window size ๐‘Š

10

Page 11: Learning Granger causality for multivariate time series

11

Permutation test

Figure 4. The scheme for calculating ๐‘-values.

โ‹ฎ

Permutation 1

Original ๐‘ฆ๐‘—

๐น ๐‘–๐‘—(1)

๐น ๐‘–๐‘—(2)

๐น ๐‘–๐‘—(๐‘ƒ)

Cumulative permutation distribution

ฮฆ๐‘–๐‘—

๐‘๐‘–๐‘— = 1 โˆ’ ฮฆ๐‘–๐‘— ๐น ๐‘–๐‘— for ๐‘– = 1, โ€ฆ , ๐‘›

Permutation 2

Permutation ๐‘ƒ

๐น ๐‘–๐‘—

Page 12: Learning Granger causality for multivariate time series

12

The number of permutations (๐‘ƒ) is the factorial of the number of windows. Since this number can be very large, we performed a Monte-Carlo permutation test in which the number of permutations used is smaller than the number of all possible permutations and the samples of rearrangement are drawn randomly [5]. Repeat for all ๐‘— and the ๐‘-value matrix is then obtained

๐‘11 ๐‘12 โ‹ฏ ๐‘1๐‘›

๐‘21 ๐‘22 โ‹ฏ ๐‘2๐‘›

โ‹ฎ โ‹ฎ โ‹ฑ โ‹ฎ๐‘๐‘›1 ๐‘๐‘›2 โ‹ฏ ๐‘๐‘›๐‘›

For a given significance level ๐›ผ, ๐น๐‘–๐‘— can be tested to decide that ๐น๐‘–๐‘— = 0 or not by thresholding the ๐‘-values.

Permutation test

Page 13: Learning Granger causality for multivariate time series

Preliminary results

An experiment was performed to study how the number of permutation (๐‘ƒ) affects the performance of the permutation test

Hypothesis: The performance of the permutation test increase with the number of permutation

Control variable: We generated 15 ground truth models with the following specification - 5 channels - 20 states (generate a VAR models of order 2 and a filter with 2 poles) - 1000 time points for time series data The estimation of state-space models were done with exactly 20 states. Data were partitioned into 10 windows in permutation tests.

13

Page 14: Learning Granger causality for multivariate time series

14

Preliminary results

Figure 5. The performance of the permutation test.

Page 15: Learning Granger causality for multivariate time series

Figure 6. An example of the results after thresholding.

15

Preliminary results

Page 16: Learning Granger causality for multivariate time series

Project Planning

16

Figure 7. The Gantt chart of this project.

Page 17: Learning Granger causality for multivariate time series

17

Project Planning

We plan to do the following experiments in the next semester.

โ€ข Experiment 2: Compare the performance of the permutation test with every permutations with the Monte-Carlo permutation. Experiment settings: With the same data, we use large window size (๐‘Š = 5) for the normal permutation test so that the number of permutation is 5! = 120 which is feasible. Then we compare the result with the Monte-Carlo permutation test. โ€ข Experiment 3: Study the effect of the number of states used in subspace identification on the performance of the permutation test. Experiment settings: With the same data, we estimate state-space models with different assumption on the number of states and compare them.

Page 18: Learning Granger causality for multivariate time series

18

Project Planning

โ€ข Experiment 4: Compare the performance and the computational cost of the permutation test with the GMM method Experiment settings: With the same data, we compare the performance measures of the permutation test with the GMM method proposed in [1]. The parameters of the permutation test are chosen based on the previous result. The computation time is also compared.

Page 19: Learning Granger causality for multivariate time series

Reference [1] Songsiri, J., Learning brain connectivity from EEG time series, 2019

[2] Van Overschee P, De Moor BL. Subspace identification for linear systems: Theoryโ€” Implementationโ€”Applications. Springer Science & Business Media; 2012. [3] L. Barnett and A. K. Seth, โ€œGranger causality for state space models,โ€ Physical Review E, vol. 91, no. 4, 2015 [4] Thomas E Nichols and Andrew P Holmes. Nonparametric permutation tests for functional neuroimaging: a primer with examples. Human brain mapping, 15(1):1-25, 2002. [5] Good, P., Permutation, parametric, and bootstrap tests of hypotheses. 2005.

19

Page 20: Learning Granger causality for multivariate time series

Q&A

20