kugiumtzis, dimitris - brain complexity analysis...

59
Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 1 Brain Complexity Analysis with Nonlinear Methods Dimitris Kugiumtzis Department of Mathematical, Physical and Computational Sciences, Faculty of Technology, Aristotle University of Thessaloniki, Greece e-mail: [email protected] http: //users.auth.gr/dkugiu

Upload: others

Post on 14-Aug-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 1

Brain Complexity Analysis with Nonlinear Methods

Dimitris Kugiumtzis

Department of Mathematical, Physical and Computational Sciences,Faculty of Technology, Aristotle University of Thessaloniki, Greece

e-mail: [email protected]: //users.auth.gr/dkugiu

Page 2: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 2

- EEG analysis

- Linear measures

- Other measures

- Nonlinear measures

- Case study

discrimination of early, intermediate, late preictal states

Outline

Page 3: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 3

http://www.comdig.com/print_article.php?id_article=21524

When a person thinks about making a decision that could result in a monetary reward, neurons fire in the brain's subcortex and in the prefrontal cortex.

Brain complexity

Page 4: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 4

Levels of Complexity (Nick Spitzer,UCSD)

1000 different types of nerve cells

10000 connections onto each nerve cell

http://omnibus.uni-freiburg.de/~vowi/BFG-Talk/Diesmann/diesmann_content.html

http://www.ama-assn.org/ama/pub/category/7146.html

100 different brain regions

100.000.000.000 nerve cells

http://www.tiscali.co.uk/reference/encyclopaedia/hutchinson/m0016171.html

Page 5: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 5

http://www.gla.ac.uk/departments/philosophy/Undergraduate%20Resources/Honours/Honours%20Courses/JH3/Brain-in-vat.gif

Measurements from Brain

Electroencephalography (EEG)

Magnetoencephalography (MEG)

video-EEG monitoring

Page 6: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 6

80 82 84 86 88 9025242322212019181716151413121110987654321

time in seconds

http://psg275.bham.ac.uk/bbs/symon-fac.htm

EEG measurements

Page 7: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 7

Underlying system for EEG

100 200 300 400 500

periodic + noise

time in seconds100 200 300 400 500

low dimensional chaos

time in seconds100 200 300 400 500

high dimensional chaos

time in seconds

Model data (under the deterministic perspective)

0 200 400time index i

x(i)

stochastic

Model data (under the stochasticperspective)

100 200 300 400 500

preictal EEG

time in seconds

Real data

100 200 300 400 500

ictal EEG

time in seconds

Page 8: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 8

Stationarity of the EEG time series?

10 20 30 40 50 60 70 80

EEG channel

time in seconds

Long EEG time series are non-stationary

analysis of consecutive segments of EEGmay reveal changes of brain dynamics

EEG time series over short periods canbe assumed stationary

5 10 15 20

0-20

20-40

40-60

60-80

EEG channel

time in seconds

Page 9: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 9

Classical (linear) Analysis

{ } 1

Nt t

x=

time series (e.g. segment from a recording of an EEG channel)

Simple descriptive statistics

Variance: 2 2

1

1 ( )1

N

x tt

s x xN =

= −− ∑ Hjorth’s activity

Hjorth’s mobility{ } 1

1

Nt t

x −

=′ first differences 2 2/x xs s′

Hjorth’s complexity{ } 2

1

Nt t

x −

=′′ second differences 2 2 2 2/ /x x x xs s s s′′ ′ ′−

∑∑

−−−

= −2)(

))(()(

xxxxxx

rt

tt ττAutocorrelation r(τ) power spectrum

1 0 1 1 1t t m t m tx x xφ φ φ ε+ − + += + + + +Autoregressive model AR(m) 2~ iid(0, )t εε σ

time-dependent coefficientsFit / prediction statisticsNRMSE(m), CC(m)

Page 10: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 10

Classical Fourier Analysis (linear analysis)

δ

δ : deep sleep state (0.4-4Hz)

θ

θ : “hypnosis” state (4-8Hz)

0 20 40 60 80 100-30

-20

-10

0

10

20

30

40

Pow

er S

pect

rum

10-1

100

101

102

-30

-20

-10

0

10

20

30

40

Pow

er S

pect

rum

α

α : conscious, relaxed state (8-12Hz)

ββ : active state (12-26Hz) γ

γ : high mental active state (26-80Hz)

Page 11: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 11

0 5 10 15 20 25 30-40

-20

0

20

40

60

time t [sec]

x(t)

early preictal EEG N=6000

10-2 10-1 100 101 10210-4

10-2

100

102

104

frequency f

PS

D

early preictal EEG PSD, N=6000

early preictal state (~4.5 h prior to seizure onset)

10-2 10-1 100 101 10210-2

100

102

104

106

frequency f

PS

D

late preictal EEG PSD, N=6000

0 5 10 15 20 25 30-40

-20

0

20

40

60

80

100

120

time t [sec]

x(t)

late preictal EEG N=6000

late preictal state (~7 min prior to seizure onset)

peak at f ≈ 31.5 Hz different signal

Page 12: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 12

- State space reconstructionto view the complexity / stochasticity of the underlying system

- Estimation of system / attractor characteristicsto quantify complexity and dimension of the underlying system- correlation dimension- Lyapunov exponents- …

- Modeling / prediction to model / predict the time series / underlying system

- Question / assess the nature of the underlying systemto test for determinism / nonlinearity

Nonlinear analysis of (univariate) time series

- Other aspects of analysis (e.g. control)

Page 13: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 13

State space reconstruction

Page 14: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 14

xi = Φ(si )

xi = [xi , xi-τ ,…, xi-(m-1)τ ]Method of delays

Parametersembedding dimension mdelay time τtime window length τw

τw = (m-1)τ

condition: m > 2d

Assume that the underlying systemis deterministic

State space reconstruction (embedding)

x

RRobservedquality

Moriginal state space

is1+is

)(1 ii sfs =+

xi = h(si )

ProjectionProjection

h

EmbeddingEmbedding

??Φ

Recon

stru

ctio

n

Recon

stru

ctio

n

RRm

1+ixix

)(1 ii xFx =+

reconstructed state space

Page 15: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 15

s(i)= 1 – 1.4 s(i-1)2 + 0.3s(i-2)or

s1 (i)= 1 – 1.4 s1(i-1)2 + s2(i-1)s2 (i)= 0.3 s1(i-1)

Reconstruction

Method of delays

Example: Henon map (discrete)

−1.5 −1 −0.5 0 0.5 1 1.5−0.4

−0.3

−0.2

−0.1

0

0.1

0.2

0.3

0.4

s1

s 2

Henon map

xi= s1 (i)Projection

0 50 100 150 200 250 300−1.5

−1

−0.5

0

0.5

1

1.5

time index i

x(i)

Henon map, time series

m=2 τ=1

−1.5 −1 −0.5 0 0.5 1 1.5−1.5

−1

−0.5

0

0.5

1

1.5

x(i−1)

x(i)

Henon map, MOD(2,1)

m=2 τ=2

−1.5 −1 −0.5 0 0.5 1 1.5−1.5

−1

−0.5

0

0.5

1

1.5

x(i−2)

x(i)

Henon map, MOD(2,2)

m=3 τ=1

−2−1

01

2

−2

0

2−2

−1

0

1

2

x(i−2)

Henon map, MOD(3,1)

x(i−1)

x(i)

m=3 τ=2

−2−1

01

2

−2

0

2−2

−1

0

1

2

x(i−4)

Henon map, MOD(3,2)

x(i−2)x(

i)

Page 16: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 16

−20−10

010

20

−20

0

20−20

−10

0

10

20

x(i−20)

x Lorenz, MOD(3,10)

x(i−10)

x(i)

τ=10

−20−10

010

20 −20

0

20

40

0

10

20

30

40

50

s2

Lorenz system

s1

s 3

0 200 400 600 800 1000−20

−15

−10

−5

0

5

10

15

20

time index i

x(i)

Lorenz system, x−variable, time series

xi= s1 (i)Projection

Reconstruction

Method of delays, m=3

−20−10

010

20

−20

0

20−20

−10

0

10

20

x(i−2)

x Lorenz, MOD(3,1)

x(i−1)

x(i)

τ=13213

21312

211 )(

csssssbssss

ssas

−=−+−=

−−=

a=10, b=28, c=8/3

Example: Lorenz system (continuous)

Optimal τ ? τ=5

−20−10

010

20

−20

0

20−20

−10

0

10

20

x(i−10)

x Lorenz, MOD(3,5)

x(i−5)

x(i)

τ=20

−20−10

010

20

−20

0

20−20

−10

0

10

20

x(i−40)

x Lorenz, MOD(3,20)

x(i−20)x(

i)

Page 17: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 17

Estimation of τ

0 20 40 60 80 1000

0.2

0.4

0.6

0.8

1

lag τ

r(τ)

Autocorrelation of x−Lorenz

0 20 40 60 80 1000

0.5

1

1.5

2

2.5

3

lag τ

I(τ)

Mutual information of x−Lorenz

From mutual information I(τ)(measure of linear and nonlinear correlations)τ from the first min of I(τ)

( , ) ( ) ( ) ( , )I X Y H X H Y H X Y= + −H: entropy

)()(),(log),(),(

, ypxpyxpyxpYXI

YX

XY

yxXY∑=

)(),( ττ

IYXIxYxX ii

→→→ −

From autocorrelation r(τ)(measure of linear correlations)τ from r(τ) =1/e or r(τ) =0

∑∑

−−−

= −2)(

))(()(

xxxxxx

rt

tt ττ

Page 18: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 18

Estimation of τ - toy models

10

0.2 ( )( ) 0.1 ( )1 ( )

s ts t s ts t

− Δ= −

+ − Δ

Mackey-Glass delay differential equationComplexity increases with Δ parameter

0 100 200 300 400 5000.4

0.6

0.8

1

1.2

1.4

time index t

x(t)Δ=17

20 40 60 80 100-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

τ

r( τ)

Autocorrelation

r(6)=1/e

r(8)=0

0 20 40 60 80 1000

0.5

1

1.5

2

2.5

τ

I( τ)

Mutual Information

I(8)=min

Δ=100

0 100 200 300 400 5000

0.5

1

1.5

time index t

x(t)

20 40 60 80 100

-0.2

0

0.2

0.4

0.6

0.8

τ

r( τ)

Autocorrelation

r(6)=1/e

r(20)=0

0 20 40 60 80 1000

0.5

1

1.5

2

2.5

τ

I( τ)

Mutual Information

I(14)=min

0 100 200 300 400 5000.2

0.4

0.6

0.8

1

1.2

1.4

1.6

time index t

x(t)Δ=30

20 40 60 80 100

-0.4

-0.2

0

0.2

0.4

0.6

0.8

τ

r( τ)

Autocorrelation

r(5)=1/e

r(7)=0

0 20 40 60 80 1000

0.5

1

1.5

2

2.5

τ

I( τ)

Mutual Information

I(7)=min

Good agreementfrom r(τ)and I(τ)

Page 19: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 19

Estimation of τ - EEG

20 40 60 80 100

-0.2

0

0.2

0.4

0.6

0.8

τ

r( τ)

Autocorrelation

r(5)=1/e

r(12)=0

0 20 40 60 80 1000

0.5

1

1.5

2

τ

I( τ)

Mutual Information

I(26)=min

ictal EEG

0 0.5 1 1.5 2 2.5

preictal EEG

time in seconds

0 20 40 60 80 1000

0.5

1

1.5

2

τ

I( τ)

Mutual Information

I(6)=min

20 40 60 80 100

0

0.2

0.4

0.6

0.8

τ

r( τ)

Autocorrelation

r(5)=1/e

r(17)=0

0 0.5 1 1.5 2 2.5

preictal EEG

time in seconds

preictal EEG

No unique optimal delay time τ

Page 20: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 20

• Spatially nearby points on the attractor are either real neighbors due to the system dynamics or false neighbors due to self-intersections.

• In a higher dimension, where the self intersections are resolved, the false neighbors are revealed as they are not neighbors any more.

• An optimal m is estimated for which no false neighbors are found as the dimension increases beyond m.

Method of false nearest neighbors (FNN)

Other estimates of m…

• If m is too small, the attractor displays self intersections• If m is too large, then “curse of dimensionality”

• Takens’ theorem: m > 2d, but d is not known

Optimal m ?RR

RR22

Estimation of m

Page 21: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 21

Example of estimation of m by FNN

The FNN estimate of optimal m depends on

- delay τ- noise

2 4 6 8 100

5

10

15

20

25

30

35

40

embedding dimension m

% o

f F

NN

x−Lorenz: FNN, τs = 0.1

τ=1 τ=10τ=20τ=50

x-Lorenz +10% noise

2 4 6 8 100

5

10

15

20

25

30

35

40

embedding dimension m

% o

f F

NN

x−Lorenz: FNN, τs = 0.1

τ=1 τ=10τ=20τ=50

x-Lorenz noise-free

Page 22: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 22

Dimension of attractor – toy models (Mackay-Glass)

0 100 200 300 400 5000.4

0.6

0.8

1

1.2

1.4

time index t

x(t)

0.4 0.6 0.8 1 1.2 1.40.4

0.6

0.8

1

1.2

1.4

x(t-7)

x(t)

00.5

11.5

00.5

11.5

0

0.5

1

1.5

x(t-14)x(t-7)

x(t)Δ=17

00.5

11.5

00.5

11.5

0

0.5

1

1.5

x(t-14)x(t-7)

x(t)

0.2 0.4 0.6 0.8 1 1.2 1.4 1.60.2

0.4

0.6

0.8

1

1.2

1.4

1.6

x(t-7)

x(t)

0 100 200 300 400 5000.2

0.4

0.6

0.8

1

1.2

1.4

1.6

time index t

x(t)

Δ=30

0 100 200 300 400 5000

0.5

1

1.5

time index t

x(t)

00.5

11.5

00.5

11.5

0

0.5

1

1.5

x(t-14)x(t-7)x(

t)0 0.5 1 1.5

0

0.5

1

1.5

x(t-7)

x(t)Δ=100

Page 23: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 23

Dimension of attractor – EEG

0 0.5 1 1.5 2 2.5

preictal EEG

time in seconds1000 1500 2000 2500 3000

1000

1500

2000

2500

3000

x(t-5)

x(t)

preictal EEG

10001500

20002500

3000

1000

2000

30001000

1500

2000

2500

3000

x(t-10)

preictal EEG

x(t-5)

x(t)

ictal EEG

0 0.5 1 1.5 2 2.5

preictal EEG

time in seconds1700 1800 1900 2000 2100 2200

1750

1800

1850

1900

1950

2000

2050

2100

2150

x(t-5)

x(t)

preictal EEG

16001800

20002200

16001800

200022001600

1800

2000

2200

x(t-10)

preictal EEG

x(t-5)

x(t)preictal

EEG

What is the dimension (degrees of freedom) of the underlying system?

Page 24: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 24

Correlation dimension characterizes the fractal structure of the attractor (self-similarity in different scales), using the densityof the points of the attractor in the state space

The idea is that the “density” p(r) for a typical r-ball covering part of the attractor scales with its radius like p(r) ~ rD , where D is the dimension

Correlation dimension ν

Example: D=1r1=1 interval contains 10 points

r2=2 interval contains points20

r1

r2

R

R2

Example: D=2r1=1 circle contains 10 points

r2=2 circle contains points40

R2

D=?

Page 25: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 25

xi

xi

Correlation sum )(1)( ∑∑ −−Θ=i j

ipairs

rN

rC jxx

νrrC ∝)(Scaling law for r small

Convergence of ν(m) as m > d

Estimation rrC

log)(log

=ν for a range of small r

If ν small / non-integer and system is deterministic

low-dimensional / fractal structure (chaos)

Correlation dimension ν

xi = [xi , xi-τ ,…, xi-(m-1)τ ]Method of delays

1 2{ , ,..., }nx x xtime series

1 2{ , ,..., }n′x x xreconstructed

trajectory (attractor)

logr1 logr2

logC(r1)

logC(r2)

r1 r2

C(r1)

C(r2)

Page 26: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 26

0 2 4 6 8 100

1

2

3

4

5

6

m

ν

−1 −0.5 0 0.5 1 1.50

1

2

3

4

5

6

7

8

slop

e

−1 −0.5 0 0.5 1 1.5−5

−4

−3

−2

−1

0

log

C(r)

x-Lorenz + 10% observational noise, τ=2

0 2 4 6 8 100

1

2

3

4

5

6

−1 −0.5 0 0.5 1 1.5−5

−4

−3

−2

−1

0

log

C(r)

−1 −0.5 0 0.5 1 1.50

1

2

3

4

5

6

7

8

slop

e

x-Lorenz + 10% observational noise, τ=10

−1 −0.5 0 0.5 1 1.5−5

−4

−3

−2

−1

0

log

C(r)

−1 −0.5 0 0.5 1 1.50

1

2

3

4

5

6

7

8

slop

e

log C(r) vs log r slope vs log r ν vs mx-Lorenz + noise-free, τ=2

0 2 4 6 8 100

1

2

3

4

5

6

m

ν

Page 27: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 27

Estimation of correlation dimension – toy models (Mackey-Glass)

-3 -2.5 -2 -1.5 -1 -0.5 0-7

-6

-5

-4

-3

-2

-1

0

log r

log

C(r)

correlation integral, τ=8 m=1,...,10

-3 -2.5 -2 -1.5 -1 -0.5 00

2

4

6

8

10

log r

slop

e

local slope, τ=8 m=1,...,10

0 2 4 6 8 100

2

4

6

8

10

m

ν(m

)

estimated correlation dimension, τ=8

Δ=17

-3 -2.5 -2 -1.5 -1 -0.5 0-7

-6

-5

-4

-3

-2

-1

0

log r

log

C(r)

correlation integral, τ=7 m=1,...,10

-3 -2.5 -2 -1.5 -1 -0.5 00

2

4

6

8

10

log r

slop

e

local slope, τ=7 m=1,...,10

0 2 4 6 8 100

2

4

6

8

10

m

ν(m

)

estimated correlation dimension, τ=7

Δ=30

-3 -2.5 -2 -1.5 -1 -0.5 0-7

-6

-5

-4

-3

-2

-1

0

log r

log

C(r)

correlation integral, τ=17 m=1,...,10

-3 -2.5 -2 -1.5 -1 -0.5 00

2

4

6

8

10

log r

slop

e

local slope, τ=17 m=1,...,10

0 2 4 6 8 100

2

4

6

8

10

mν(

m)

estimated correlation dimension, τ=17

Δ=100

Page 28: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 28

Estimation of correlation dimension – EEG

ictal EEG

0 0.5 1 1.5 2 2.5 3 3.5-7

-6

-5

-4

-3

-2

-1

0

log r

log

C(r)

correlation integral, τ=26 m=1,...,10

0 0.5 1 1.5 2 2.5 3 3.50

2

4

6

8

10

log r

slop

e

local slope, τ=26 m=1,...,10

0 2 4 6 8 100

2

4

6

8

10

m

ν(m

)

estimated correlation dimension, τ=26

preictal EEG

0 0.5 1 1.5 2 2.5 3 3.5-7

-6

-5

-4

-3

-2

-1

0

log r

log

C(r)

correlation integral, τ=17 m=1,...,10

0 0.5 1 1.5 2 2.5 3 3.50

2

4

6

8

10

log r

slop

e

local slope, τ=17 m=1,...,10

0 2 4 6 8 100

2

4

6

8

10

m

ν(m

)

estimated correlation dimension, τ=17

No reliable estimation of correlation dimension, maybe only for ictal EEG

Page 29: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 29

Lyapunov exponents are average rates of stretching or contractionover the attractor, in the directions of the locally decomposed state space

Lyapunov spectrum: mλλλ ≥≥≥ ...21

λi > 0 stretching

λi < 0 contraction

λi = 0 along the flow

If λi > 0 and system is deterministic

chaos

Lyapunov exponents

Page 30: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 30

Largest Lyapunov Exponent λ1 (LLE)

xi

xi'

xi+t

xi'+t

δ0δt

Distance δ0= xi - xi' small perturbationshould grow exponentially in time

After time t: δt= xi+t - xi'+t

Example: x-Lorenz

noise-free

0 2 4 6 8 100.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

m

λ 1

x−Lorenz noise−free, LLE

τ=1 τ=5 τ=10

with 10%-noise

0 2 4 6 8 100.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

m

λ 1

x−Lorenz +10% noise, LLE

τ=1 τ=5 τ=10

If tt e 1

0λδδ ≈ λ1 is LLE

Page 31: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 31

Largest Lyapunov Exponent (LLE) estimation

No reliable estimation of LLE

2 4 6 8 100

0.05

0.1

m

LLE

MG-17MG-30MG-100

toy models

2 4 6 8 100

0.05

0.1

m

LLE

ictalpreictal

EEG

However, the characteristics of the systems (correlation dimension, LLE) can be used as indices / measures that can distinguish states of the EEG

Page 32: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 32

xi = Φ(si )

xi = [xi , xi-τ ,…, xi-(m-1)τ ]Method of delays

Parametersembedding dimension mdelay time τtime window length τw

τw = (m-1)τ

condition: m > 2d

Assume that the underlying systemis deterministic

State space reconstruction (embedding)

x

RRobservedquality

Moriginal state space

is1+is

)(1 ii sfs =+

xi = h(si )

ProjectionProjection

h

EmbeddingEmbedding

??Φ

Recon

stru

ctio

n

Recon

stru

ctio

n

RRm

1+ixix

)(1 ii xFx =+

reconstructed state space

)(1 ii Fx x=+

ix

1 1 1 1 ( 1)[ , , , ] 'i i i i mx x xτ τ+ + + − + − −=x …

Page 33: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 33

50 100 150 200 250x(

i)

Lorenz + 5% noise: Analogue method

1

2

3

4

Prediction using similar past segments of the time series

Predict for time i+T using the images Τ time steps ahead of the segments from the past, which are similar to the current segment

10 20 30 40 50time index i

x(i)

Henon + 5% noise: Analogue method

1

2

3

4

given x1, x2, … xi predict xi+1 or xi+T

Page 34: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 34

−1−0.5

00.5

1

−1

0

1

−1

−0.5

0

0.5

1

x(i)

Henon + 5% noise: State space prediction

x(i−1)

x(i+

1)

Local Prediction ModelsImplementing the idea of analogue segments:time series segments reconstructed points

},...,,{ )()2()1( Kiii xxxNearest points to xi:

Prediction of xi+T from the images of the neighbors },...,,{ )()2()1( TKiTiTi xxx +++

Constant prediction: TiiTi xTxx ++ =≡ )1()(ˆ

−100

10

−100

10

−10

0

10

x(i)

Lorenz + 5% noise: State space prediction

x(i−1)

x(i+

5)

( 1), ( 2), 1, ,i m i m i ix x x x− − − − −…segment

1 ( 1)[ , , ] mi i i i mx x x R− − −= ∈…xreconstructed

point

Average prediction ∑=

+=K

jTjii x

KTx

1)(

1)( Local Average Map (LAM)

Page 35: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 35

Local Linear Map (LLM)

We assume that for each point xithe underlying system can be approximated by a linear model:

i

mimii

miiiii

'a

xaxaxaa

xxxFFx

xa

x

+=

++++=

==

−−−

−−−+

0

)1(210

)1(1 ),,,()(

ττ

ττ …

( )∑=

+ ′+−K

jjijiaaa

axm 1

2)(01)(,,,)(min

10

xa…

Parameter estimation(least square method)

maaa ,,, 10 …

The model holds for)()2()1( ,...,, Kiii xxx

)(0)(

)1(0)1(

KiTKi

iTi

ax

ax

xa

xa

′+=

′+=

+

+

)()2()1( ,...,, Kiii xxx

Page 36: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 36

Improvement of LLM

Regularization of the ordinary least square solution of the model parameters

(principal component regression, PCR)

The parameter solution is restricted to a subspacedefined by the principal components

Page 37: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 37

- Nonlinear modeling andprediction

Can a nonlinear model be worsethan a linear?

-6 -4 -2 0 2 4 6-6

-4

-2

0

2

4

6

x(t)

x(t+

1)

-6 -4 -2 0 2 4 6-6

-4

-2

0

2

4

6

x(t)

x(t+

1)

-6 -4 -2 0 2 4 6-8

-6

-4

-2

0

2

4

6

x(t)

x(t+

1)

-6 -4 -2 0 2 4 6-5

0

5

10

15

x(t)

x(t+

1)

K=20

K=6

Page 38: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 38

- Nonlinear modeling andprediction

Can a nonlinear model be worsethan a linear?

- Computation of NRMSE for increasing number of neighbors

- At the limit of the largest number of neighbors the LLM becomes …the linear autoregressive model

Example: Mackey-Glass, Δ=100 τ=1, n=1500, n - n1=500

101 102 1030

0.5

1

1.5

2

# neighbors

NR

MS

E

T=1T=5T=10

m=10

101 102 1030

0.5

1

1.5

2

# neighbors

NR

MS

E

T=1T=5T=10

m=20

If the model parameters like m and K are not properly assigned the error with the nonlinear model can be larger than with the linear

Page 39: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 39

Conclusions for the nonlinear methods

1. The results of the nonlinear methods depend heavily on the state space reconstruction parameters (τ and m).

No straightforward estimation of embedding parameters. The estimation is complicated for densely sampled data (EEG).

2. When the data are noisy the estimates are not accurate. Noise reduction / filtering can give you what you “wish”. Biased analysis

3. The nonlinear methods give estimates under the hypothesis that the underlying system is indeed deterministic.

Perform first the surrogate data test for nonlinearity. Other tests?

Page 40: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 40

Test of a null hypothesis H0 for x :

2. Selection of a discriminating statistic qComputation of :- q0 on x- q1, q2,…, qM, on z1, z2,…, zM

q0

3. Rejection of H0 if q0 does not belongin the distribution of q1, q2,…, qM

Time series 1 2[ , , , ] 'nx x x= …x Rxi ∈

100 200 300 400 500 600 700 8000

0.005

0.01

0.015

0.02

0.025

0.03Volatility over 12 weeks of exchange rates USD/GBP

week index i

Vola

tility

Original time series

x q0

q1

qM

1. Generation of M surrogate time seriesz1, z2,…, zM (consistent to H0)

100 200 300 400 500 600 700 8000

0.005

0.01

0.015

0.02

0.025

0.03Surrogate time series for volatility data

time index i

z(i)

100 200 300 400 500 600 700 8000

0.005

0.01

0.015

0.02

0.025

0.03Surrogate time series for volatility data

time index i

z(i)

Surrogate time series

z1

zM

Τhe surrogate data test

Page 41: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 41

Τhe surrogate data test for nonlinearity

21 2[ , , ] ~ ( , , )s s ss s μ σ ρ= Νs … s: normal process

nishx ii ,,1),( …== h: static transfrom

Null hypothesis H0:The time series x is generated by a stationary linear stochastic process

The time series x is generated by a normal (Gaussian)process under a static (instantaneous) transform(linear or nonlinear, monotonic or non-monotonic)

… explicitly,

Conditions on the surrogate data:Preserve sample autocorrelation(alternatively, power spectrum)

Preserve sample marginal cdf

max,,1),()( ττττ …== xz rrC1.

( ) ( )z t x tF z F x=C2.

Page 42: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 42

Algorithms for the generation of surrogate data

1. Amplitude Adjusted Fourier Transform, AAFT [Theiler et al, Physica D, 1992]

2. Iterated Amplitude Adjusted Fourier Transform, IAAFT[Schreiber & Schmitz, PRL, 1996]

There are both Fourier-type methods(making use of FFT, phase randomization and inverse FFT)

Constrained realization approach: generates surrogate time series that match the characteristics underlined by H0:C1: power spectrum (approximately) C2: marginal cdf (exact)

AAFT assumes that the examined time series x is a monotonic transformof a Gaussian process

IAAFT attempts to improve AAFT modifying the power spectrum at each step to match better the original power spectrum

3. Statically Transformed Autoregressive Process, STAP [Kugiumtzis, PRE, 2002]

based on polynomial approximation of the sample transform to Gaussian

Typical realization approach: uses an appropriate model to generate the surrogate data, so that the characteristics underlined by H0 are matched

Page 43: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 43

0 5 10 15 20

sec

EE

GNormal and epileptic EEG, the whole time series

epileptic

normal

5.5 6 6.5 7 7.5

sec

EE

G

Normal and epileptic EEG, segment of the whole time series

epileptic

normal

1800 1850 1900 1950 2000 2050 2100 21500

0.02

0.04

0.06

0.08

0.1

bins of x−values

num

ber

of x

−va

lues

in th

e bi

ns

Histogram for normal EEG

originalGaussian

1000 1500 2000 2500 30000

0.005

0.01

0.015

0.02

0.025

0.03

0.035

0.04

0.045

bins of x−values

num

ber

of x

−va

lues

in th

e bi

ns

Histogram for epileptic EEG

originalGaussian

Page 44: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 44

5 10 15 20

0.0

0.5

0.0

0.5

0.0

0.5

1.0

time lag τ

r(τ)

Normal EEG, Autocorrerelation

STAP

IAAFT

AAFT

5 10 15 20

0.0

0.5

0.0

0.5

0.0

0.5

1.0

time lag τ

r(τ)

Epileptic EEG, Autocorrerelation

STAP

IAAFT

AAFT

Preservation of linear correlation structure?

Page 45: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 45

10 20 30 40 50 60

0.7

0.8

0.7

0.8

0.7

0.8

0.9

number of polynomial terms i

CC

Normal EEG, CC of Volterra polynomials

STAP

IAAFT

AAFT

10 20 30 40 50 600

2

4

6

8

10

number of polynomial terms i

S

Normal EEG, Significance from Volterra polynomials

AAFT IAAFTSTAP

( ))1(1 ,,,)(ˆ −−−+ == miiikikTi xxxppx …x2 2

0 1 ( 1) 1 2 1 ( 1)i m i m m i m i i k i m

linear nonlinear

a a x a x a x a x x a x− − + + − − −= + + + + + + +

q statistic : fit of Volterra polynomials

)()()( 12102101 ikiiiii pxaxaapxaap xxx …−++=+=polynomial series:

first m polynomials are linear

Page 46: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 46

10 20 30 40 50 60

0.7

0.8

0.7

0.8

0.7

0.8

0.9

number of polynomial terms i

CC

Epileptic EEG, CC of Volterra polynomials

STAP

IAAFT

AAFT

10 20 30 40 50 600

10

20

30

40

50

number of polynomial terms i

S

Epileptic EEG, Significance from Volterra polynomials

AAFT IAAFTSTAP

Surrogate data should be checked whether they fulfill the conditions of H0

Page 47: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 47

“… Linear measures were found to perform similar or better than non-linear measures.”

“… the linear methods performed as good as the non-linear ones.”

Primitive methods are “smarter” than we think

primitive: simple measures

?

Page 48: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 48

Pre-processing of the EEG time seriesFiltering

6 6.5 7 7.5 8 8.5 9-30

-20

-10

0

10

20

30

time in seconds

x(t)

raw and filtered EEG

6 6.5 7 7.5 8 8.5 9-30

-20

-10

0

10

20

time in seconds

x(t)

detrended EEGDetrending

{ } 1

Nt t

x=

histogram

{ } 1

Nt t

x=

{ } 1

Nt t

x=

“Gaussianization” of gives ( )1 ( )t x ty F x−= Φ

{ } 1

Nt t

y=

Gaussianhistogram

{ } 1

Nt t

y=

{ } 1

Nt t

y=

6 6.5 7 7.5 8 8.5 9-30

-20

-10

0

10

20

30

time in seconds

x(t)

raw EEG segment

-40 -20 0 20 40 600

20

40

60

80

100

120

140

x

coun

ts

Histogram of raw EEG segment

6 6.5 7 7.5 8 8.5 9-4

-3

-2

-1

0

1

2

3

time in seconds

y(t)

"Gaussianized" EEG segment

-4 -2 0 2 40

20

40

60

80

100

y

coun

ts

Histogram of "Gaussianized" EEG segment

… and the measures are computed on the derived time series

Page 49: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 49

Correlation measures

mutual information of a normal time series ( )2( ) 0.5log 1 ( )gy yI rτ τ= − −

mutual information of a time series with normal amplitudes ( )yI τ

( ) ( ) ( )gy y ydI I Iτ τ τ= −the normal mutual information difference

measures possible deviation from linearity

( )yq dI τ=1

( ) ( )y yq dM dIτ

τ

τ τ∗

=

= =∑

linear correlation

cumulative autocorrelation1

( ) ( )x xq Q rτ

τ

τ τ∗

=

= =∑ for a maximum lag τ ∗

( )xq r τ=

1( ) ( )x xq M I

τ

τ

τ τ∗

=

= =∑

( )xq I τ=

= maximum lag for which levels off( )xI τ

τ ∗cumulative mutual information

nonlinear correlation

Page 50: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 50

0 10 20 30 40 50 60 70-30

-20

-10

0

10

20

t

x(t)

x1max

x1min

t1osc

t1max,min

x2max

x2min

t2osc

t2max,min

Oscillation features

inter-spike interval on

inter-spike interval on

difference of local maxima and minima

time from local minimum to next maximum

time between consecutive local maxima

local minima

local maxima (from window of 15 samples)

DescriptionTime series

{ }max

1

n

i ix

=

{ }min

1

n

i ix

=

{ }osc

1

n

i it

=

{ }max,min

1

n

i it

=

{ }abs

1

n

i iz

=

{ }cut

1

n

i iz

′′

=

{ }max,min

1

n

i iδ

=

{ } 1| | N

t tx

=

{ } 1cutoff N

t tx

=+inter-spike interval on

inter-spike interval on

difference of local maxima and minima

time from local minimum to next maximum

time between consecutive local maxima

local minima

local maxima (from window of 15 samples)

DescriptionTime series

{ }max

1

n

i ix

=

{ }min

1

n

i ix

=

{ }osc

1

n

i it

=

{ }max,min

1

n

i it

=

{ }abs

1

n

i iz

=

{ }cut

1

n

i iz

′′

=

{ }max,min

1

n

i iδ

=

{ } 1| | N

t tx

=

{ } 1cutoff N

t tx

=+

Oscillation-related measuresDerive feature time series from the oscillating time series

- Simple statistics on the feature time series, e.g. mean or varianceOscillation-related measures

- Correlations in the feature time series

- local (linear) dynamic regression model

- (linear) dynamic regression model

, 1 0 1 1, 2 2, 3 3, 4 4,( ) ( ) ( ) ( )k i i i i iz a a B z a B z a B z a B z+ = + + + +

max1,i iz x= min

2,i iz x= osc3,i iz t= max,min

4,i iz t=

NRMSEq =

Page 51: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 51

The problem

- Can q discriminate the two states?

- Which q can discriminate best?

early preictal EEG

late preictal EEG

5 10 15 20 25 30

0.01-30

30.01-60

60.01-90

90.01-120

20.01-150

early preictal, RT2

time in seconds

5 10 15 20 25 30

0.01-30

30.01-60

60.01-90

90.01-120

20.01-150

late preictal, RT2

time in seconds

measure q

0 1 2 3 4 5 60.05

0.1

0.15

0.2

0.25

0.3

segment iq i

AUT(5)

earlylate

Case studyin collaboration withP. Larsson (Epilepsy Center, Norway)A. Papana, A. Tsimpiris, I. Vlachos (Phds)[LNCS, 2007; Int. J. Bioelectromagnetism, 2007]

Page 52: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 52

correlation features oscillation features

Evaluation of the discriminating power of featuresThree preictal states: early (e), intermediate (i), late (l)

10 min recording for each state

segments of 30sec

20 multichannel EEG segmentsfor each state and epoch

a sample of 20 values for each feature and channel

μ2

m2

Student test results (p-values) for preictal states early – intermediate

white: p ≥ 0.05gray: 0.01 ≤ p < 0.05black: p < 0.01

Page 53: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 53

early – latecorrelation features oscillation features

intermediate – latecorrelation features oscillation features

Page 54: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 54

Evaluation of the discriminating power of set of features

Combined discrimination power of features feature-based clustering

For each clustering problem we give:- the features on the 20 time series from each preictal state- the number of clusters to form

All clustering tasks: (e – i), (e – l), (i – l), (e – i – l)

Example: for the task (e – i), the data base has 40 records of features (20 from each preictal state)

The algorithm gives the optimal feature subset that attains best clustering accuracy evaluated by CRI (the estimated partition classifies best the original groups)

corrected Rand index

totally 20 features

( )yQ τ ∗ ( )xM τ ∗ τ ∗- 8 correlation features: ry(5), ry(10), ry(20), , Ix(5), , dIy(5), and

- 6 oscillation-related features:

- scalar higher order moments, skewness λ and kurtosis κ

- bicorrelation at lags 1 and 2, r3

- the largest Lyapunov exponent, λ1

Feature set:

max( )im x osc( )im tmin( )im x maxIQR( )ix oscIQR( )itminIQR( )ix

Page 55: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 55

Best feature subset:

- Contains a single feature or two features

- High clustering accuracy(CRI close to 1) for A, B

- Variation across channels

- Most frequent features inthe optimal feature subset:

max( )im x min( )im x (5)yr

Page 56: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 56

Statistical assessment of preictal state discrimination, many measuresConsecutive non-overlapping segments of 30sec length

-200 -150 -100 -50 0 0

0.010

0.020

0.005

0.015

0.025

time [min]

central

temporalAUC=0.65 AUC=0.59

AUC=0.56 AUC=0.56

λy(m=5,K=20)

Measure profile:A series of values for each measure estimated at each segment

-200 -150 -100 -50 0-60

-20

20

-20

20

60

time [min]

central

temporalAUC=0.86 AUC=0.62

AUC=0.72 AUC=0.52

m(ximin)

Segments over 30min are grouped(60 segments in each group)Last group is just before seizure onset(late preictal state)

Estimate group difference for eachmeasure and channel using AUC of ROC

10 15 20 25 300

0.05

0.1

0.15

0.2

measure in bins

bin

prob

abili

ty

period [-100,-70]period [-30,0]

0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1

AUC=0.82

false positive

true

posi

tive

Measures on EEG time series

Original time series

Feature time series

- Simple statistics- Correlation- Complexity / Dimension- Modeling

Page 57: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 57

0.884

0.886

0.899

0.911

0.913

0.913

0.913

0.914

0.920

0.972

AUCmeasure

G

0.629

0.633

0.633

0.636

0.645

0.646

0.652

0.675

0.677

0.779

AUCmeasure

F

0.778

0.794

0.802

0.802

0.815

0.816

0.843

0.846

0.847

0.850

AUCmeasure

EDCBA

0.7810.6940.7040.69310

0.8120.6960.7050.6949

0.8330.6970.7110.7038

0.8450.6990.7370.7047

0.8530.7150.7470.7196

0.8560.7260.7490.7205

0.8890.8010.7500.7214

0.8890.8100.7550.7343

0.8900.8150.7570.7352

0.9190.8270.8030.7431

AUCmeasureAUCmeasureAUCmeasureAUCmeasure

S(5)yrK (5)yr

(5)yI

K (10)yrS(10)yr

P (10)yr

E ( )y β

dlocAR (5,40)x

S(5)yr

dlocAR (5,20)x

yHjC

dlocAR (10,20)x

dlocAR (10,40)x

minm( )ixE ( )y γ

yHjM

absm( )izmaxm( )ix

P (5)yr

E ( )y γ

E ( )y θ

maxm( )ix

max,minm( )iδabsm( )izdAC y

pACx

mf

absm( )iz

maxIQR( )ix

minIQR( )ix

K (5)yr

minm( )ixmax,minm( )iδ

minIQR( )ixmaxIQR( )ixabsIQR( )iz

max,minIQR( )iδ

dAR (0,5)x

dlocAR (10,40)x

yDFCS(10)yr

K (10)yrP (10)yr

yHeCE ( )y θ

S (20)yrK (20)yrP (20)yr

E ( )y α

eτS(10)yr

K (10)yrP (10)yr(10)yI(10)ydI

S (40)yCrmax,minIQR( )it

K (40)yCrS

max( )yCr τ

yHjCK (30)yrS(30)yrS(5)yrK (5)yr

P (30)yrP (5)yr

E ( )y δmf

dloc (5,10,20)x

0.884

0.886

0.899

0.911

0.913

0.913

0.913

0.914

0.920

0.972

AUCmeasure

G

0.629

0.633

0.633

0.636

0.645

0.646

0.652

0.675

0.677

0.779

AUCmeasure

F

0.778

0.794

0.802

0.802

0.815

0.816

0.843

0.846

0.847

0.850

AUCmeasure

EDCBA

0.7810.6940.7040.69310

0.8120.6960.7050.6949

0.8330.6970.7110.7038

0.8450.6990.7370.7047

0.8530.7150.7470.7196

0.8560.7260.7490.7205

0.8890.8010.7500.7214

0.8890.8100.7550.7343

0.8900.8150.7570.7352

0.9190.8270.8030.7431

AUCmeasureAUCmeasureAUCmeasureAUCmeasure

S(5)yrK (5)yr

(5)yI

K (10)yrS(10)yr

P (10)yr

E ( )y β

dlocAR (5,40)x

S(5)yr

dlocAR (5,20)x

yHjC

dlocAR (10,20)x

dlocAR (10,40)x

minm( )ixE ( )y γ

yHjM

absm( )izmaxm( )ix

P (5)yr

E ( )y γ

E ( )y θ

maxm( )ix

max,minm( )iδabsm( )izdAC y

pACx

mf

absm( )iz

maxIQR( )ix

minIQR( )ix

K (5)yr

minm( )ixmax,minm( )iδ

minIQR( )ixmaxIQR( )ixabsIQR( )iz

max,minIQR( )iδ

dAR (0,5)x

dlocAR (10,40)x

yDFCS(10)yr

K (10)yrP (10)yr

yHeCE ( )y θ

S (20)yrK (20)yrP (20)yr

E ( )y α

eτS(10)yr

K (10)yrP (10)yr(10)yI(10)ydI

S (40)yCrmax,minIQR( )it

K (40)yCrS

max( )yCr τ

yHjCK (30)yrS(30)yrS(5)yrK (5)yr

P (30)yrP (5)yr

E ( )y δmf

dloc (5,10,20)x

7 preictal scalp EEG records (A-G): (provided by Neuroclinic, Rikshospitalet, Norway)

- Different patients, single seizure episode, all seizures are generalized tonic clonic. - Registration: 3h and 10min duration prior to seizure onset.

Ranking of measures from a single comparison of a pair of groupsbased on their average score of AUC over all channels, group 1: [-190,-160], group 2: [-30,0]

Page 58: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 58

Ranking of measuresbased on their average score of AUC over all channels, and 5 scenariosof group comparisons: group 1: [-190,-160], group 2: [-30,0]

[-160,-130] //[-130,-100] //[-100,-70] //[-70,-40] //

0.868

0.874

0.874

0.891

0.904

0.904

0.908

0.914

0.914

0.939

AUCmeasure

G

0.638

0.638

0.641

0.642

0.644

0.644

0.647

0.65

0.652

0.786

AUCmeasure

F

0.803

0.806

0.814

0.814

0.814

0.829

0.855

0.864

0.864

0.873

AUCmeasure

EDCBA

0.6980.6610.6450.66110

0.7000.6680.6460.6739

0.7110.6770.6490.6928

0.7130.6830.6520.7197

0.7140.6930.6570.7316

0.7320.7000.6630.7325

0.7340.7040.6630.7354

0.7340.7150.6660.7353

0.7640.7420.6760.7392

0.8220.7740.6830.7751

AUCmeasureAUCmeasureAUCmeasureAUCmeasure

K (10)yr

E ( )y β

yHjC

minm( )ix

E ( )y γ

mfmaxm( )ix

absm( )iz

max,minm( )iδ

maxm( )ix

minIQR( )ixmaxIQR( )ix

absIQR( )iz

minm( )ixmax,minIQR( )iδ

dlocAR (5,40)x

dlocAR (5,20)x

dlocAR (10,20)x

dlocAR (10,40)x

E ( )y γ

(5, 40)yλ

pACxdAC y

dlocAR (10,20)x

yHjMmax,minm( )iδ

dloc (5,10,20)x

dlocAR (5,20)x

maxm( )ix

E ( )y βE ( )y δ

cutAE ( , )z

r m

eτabsm( )izminm( )ix

absIQR( )izmaxIQR( )ixminIQR( )ix

dAR (0,5)xK (5)yr

yDFC

S(20)yr

K (20)yr

P (20)yr

yHeCdAC ypACx

E ( )y θP (10)yrS (10)yr

eτE ( )y γ

minm( )ixmax,minm( )iδ

S (40)yCr

K (40)yCr

max min,(1)

x xc

(40)ydCImaxm( )ix

yHjM

yHjCK (30)yrS(30)yr

S(5)yrK (5)yr

P (30)yr

P (5)yrE ( )y α

max,minIQR( )it

yDFS

0.868

0.874

0.874

0.891

0.904

0.904

0.908

0.914

0.914

0.939

AUCmeasure

G

0.638

0.638

0.641

0.642

0.644

0.644

0.647

0.65

0.652

0.786

AUCmeasure

F

0.803

0.806

0.814

0.814

0.814

0.829

0.855

0.864

0.864

0.873

AUCmeasure

EDCBA

0.6980.6610.6450.66110

0.7000.6680.6460.6739

0.7110.6770.6490.6928

0.7130.6830.6520.7197

0.7140.6930.6570.7316

0.7320.7000.6630.7325

0.7340.7040.6630.7354

0.7340.7150.6660.7353

0.7640.7420.6760.7392

0.8220.7740.6830.7751

AUCmeasureAUCmeasureAUCmeasureAUCmeasure

K (10)yr

E ( )y β

yHjC

minm( )ix

E ( )y γ

mfmaxm( )ix

absm( )iz

max,minm( )iδ

maxm( )ix

minIQR( )ixmaxIQR( )ix

absIQR( )iz

minm( )ixmax,minIQR( )iδ

dlocAR (5,40)x

dlocAR (5,20)x

dlocAR (10,20)x

dlocAR (10,40)x

E ( )y γ

(5, 40)yλ

pACxdAC y

dlocAR (10,20)x

yHjMmax,minm( )iδ

dloc (5,10,20)x

dlocAR (5,20)x

maxm( )ix

E ( )y βE ( )y δ

cutAE ( , )z

r m

eτabsm( )izminm( )ix

absIQR( )izmaxIQR( )ixminIQR( )ix

dAR (0,5)xK (5)yr

yDFC

S(20)yr

K (20)yr

P (20)yr

yHeCdAC ypACx

E ( )y θP (10)yrS (10)yr

eτE ( )y γ

minm( )ixmax,minm( )iδ

S (40)yCr

K (40)yCr

max min,(1)

x xc

(40)ydCImaxm( )ix

yHjM

yHjCK (30)yrS(30)yr

S(5)yrK (5)yr

P (30)yr

P (5)yrE ( )y α

max,minIQR( )it

yDFS

There is a large variation of performance of the measures across - channels - epochs.

Page 59: Kugiumtzis, Dimitris - Brain Complexity Analysis …biosignal.med.upatras.gr/school2008/Materials/Kugiumtzis...Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008

Kugiumtzis Dimitris, 4th Summer School on Biomedicine, Patras, June 2008 59

Nonlinear dynamics are appealing and we want to investigate

them in physiological data, but…

- are they really there?

- can we detect them from the measurements?

matlab toolkitMeasures of Analysis of Time Series, MATS together with A. Tsimpiris