Time series

Attribution Non-Commercial (BY-NC)

7 views

Time series

Attribution Non-Commercial (BY-NC)

- Beam Forming for Imaging
- m12379
- 7.Block-Based Feature-Level Multi-Focus Image Fusion
- 7
- Problem Books in Mathematics Functional Equations
- Cardiac Analyser based on LabVIEW
- PMU Based Midterm Stability Evaluation of Wide Area Power System
- 2009 - Distance Relaying Algorithm Using a DFT-Based Modified Phasor Estimation
- 05729570
- Chapter 05b Image Restoration (Linear Restoration)
- Fourier Series/Transform
- FFT descreening
- Noncontact capture of pilling profile on fabric surface - objective assessment method
- Yojana Mam
- Wavelet GLCM
- 6. Electrical - IJEEE-IJEEE-Detecting Changes in Synthetic - Maryura M. Mane
- Fft
- Computation of Power of a Signal in Matlab – Simulation and Verification
- ISSPA Paper From IEEE Site
- List

You are on page 1of 10

Prof. Paolo Ciaccia http://www.unibo. -LS/ http://www-db.deis db.deis. unibo.it/ it/courses/SI courses/SI08_TimeSeries.pdf 08_TimeSeries.pdf

Sistemi Informativi LS

Time series, that is, sequences of observations made through time, are present in everydays life:

Temperature, rainfalls, seismic traces Weblogs Stock prices EEG, ECG, blood pressure Enrolled students at the Engineering Faculty

29 28 27 26 25 24 230 50 100 150 200 250 300 350 400 450 500

This as well as many of the following figures/examples are taken from the tutorial given by Eamonn Keogh at SBBD 2002 (XVII Brazilian Symposium on Databases) www.cs.ucr.edu/~eamonn/

Sistemi Informativi LS

Consider a large time series DB:

1 hour of ECG data: 1 GByte Typical Weblog: 5 GBytes per week Space Shuttle DB: 158 GBytes MACHO Astronomical DB: 2 TBytes, updated with 3 GBytes a day (20 million stars recorded nightly for 4 years) http://wwwmacho.anu.edu.au/

Looking for the occurrence of known patterns Discovering unknown patterns Putting things together (clustering) Classifiying new data Predicting/extrapolating future behaviors

Sistemi Informativi LS 3

Given two time series of equal length D, the commonest way to measure their (dis-)similarity is based on Euclidean distance However, with Euclidean distance we have to face two basic problems

1. High-dimensionality: (very) large D values 2. Sensitivity to alignment of values s

For problem 1. we need to define effective lower-bounding techniques that work in a (much) lower dimensional space For problem 2. we will introduce a new similarity criterion

L 2 (s, q) =

D-1 t =0

(s t q t )

Sistemi Informativi LS

The first approach to reducing the dimensionality of time series, proposed in [AFS93], was based on Discrete Fourier Transform (DFT) Remind: given a time series s, the Fourier coefficients are complex numbers (amplitude,phase), defined as:

Sf = 1

t =0 t

f =0

D 1

f = 0,..., D 1

From Parseval theorem we know that DFT preserves the energy of the D 1 D 1 signal: 2 2

E(s ) = s t = E(S ) = S f

t =0

L 2 (s, q) 2 = (s t q t ) = E(s q) = E(S Q ) = S f Q f

2 t =0 f =0 D 1 D 1 2

= L 2 (S, Q) 2

thus, DFT preserves the Euclidean distance And? What can we gain from such transformation??

Sistemi Informativi LS 5

The key observation is that, by keeping only a small set of Fourier coefficients, we can obtain a good approximation of the original signal Why: because most of the energy of many real-world signals concentrates in the low frequencies ([AFS+93]): More precisely, the energy spectrum (|Sf|2 vs. f) behaves as O(f-b), b > 0:

b = 2 (random walk or brown noise): used to model the behavior of stock movements and currency exchange rates b > 2 (black noise): suitable to model slowly varying natural phenomena (e.g., water levels of rivers) b = 1 (pink noise): according to Birkhoffs theory, musical scores follow this energy pattern

Thus, if we only keep the first few coefficients (D << D) we can achieve an effective dimensionality reduction

Note: this is the basic idea used by well-known compression standards, such as JPEG (which is based on Discrete Cosine Transform)

For what we have seen, this projection technique satisfies the L-B lemma

Sistemi Informativi LS 6

Sampling rate: 128 Hz

Energy spectrum

Sistemi Informativi LS

Another example

128 points

s s

0 20 40 60 80 100 120 140

data values

0.4995 0.5264 0.5523 0.5761 0.5973 0.6153 0.6301 0.6420 0.6515 0.6596 0.6672 0.6751 0.6843 0.6954 0.7086 0.7240 0.7412 0.7595 0.7780 0.7956 0.8115 0.8247 0.8345 0.8407 0.8431 0.8423 0.8387

Fourier coefficients

1.5698 1.0485 0.7160 0.8406 0.3709 0.4670 0.2667 0.1928 0.1635 0.1602 0.0992 0.1282 0.1438 0.1416 0.1400 0.1412 0.1530 0.0795 0.1013 0.1150 0.1801 0.1082 0.0812 0.0347 0.0052 0.0017 0.0002 ...

1.5698 1.0485 0.7160 0.8406 0.3709 0.4670 0.2667 0.1928

Sistemi Informativi LS

Comments on DFT

Can be computed in O(DlogD) time using FFT (provided D is a power of 2) Difficult to use if one wants to deal with sequences of different length Not really amenable to deal with signals with spots (time-varying energy) An alternative to DFT is to use wavelets, which takes a different perspective:

A signal can be represented as a sum of contributions, each at a different resolution level Discrete Wavelet Transform (DWT) can be computed in O(D) time

Experimental results however show that the superiority of DWT w.r.t. DFT is dependent on the specific dataset

Good for wavelets bad for Fourier

0 200 400

Sistemi 600Informativi LS 0

200

400

9 600

PAA (Piecewise Aggregate Approximation) [KCP+00,YF00] is a very simple, intuitive and fast (O(D)) method to approximate time series

Its performance is comparable to that of DFT and DWT

We take a window of size W and segment our time series into D = D/W pieces (sub-sequences), each of size W i W 1 st For each piece, we compute the average of values, i.e. t = (i 1) W ' Our approximation is therefore s = (s1,,sD) si = W We have W L2(s,q) L2(s,q) (arguments generalize those used for the global average example)

s W s'

20

40

60

80

100

120

140

Sistemi Informativi LS

10

Euclidean distance, as well as other Lp-norms, are not robust w.r.t., even small, contractions/expansions of the signal along the time axis

E.g., speech signals

Intuitively, we would need a distance measure that is able to match a point of time series s even with surrounding points of time series q

Alternatively, we may view the time axis as a stretchable one

A distance like this exists, and is called Dynamic Time Warping (DTW)!

11

Sistemi Informativi LS

Assume that the two time series s and q have the same length D

Note that with DTW this is not necessary anymore!

We take di,j = (si - qj)2, but other possibilities exist (e.g., |si qj|) D=6

s q 0 1 2 1 2 3 2 5 2 3 4 1 4 3 3 5 7 4 7 3 4 5 2 25 16 25 36 16 1 4 9 0 1 2 0 1 4 1 4 3 1 4 9 0 1 2 4 9 16 1 0 1 0 1 4 1 4 3 9 1 0 1 4 9 4

L2(s,q) = 29

Start from (0,0) and end in (D-1,D-1) 1 Take one step at a time d At each step, move only by increasing i, j, or both

I.e., never go back!

Jumps are not allowed! Sum all distances you have found in the warping path

Sistemi Informativi LS 12

The figure shows a possible warping path w, whose cost is 21

The Euclidean path moves only along the main diagonal, and costs 29

7 3 4 5 2 1 25 16 25 36 16 1 4 9 0 1 2 0 1 4 1 4 3 1 4 9 0 1 2 4 9 16 1 0 1 0 1 4 1 4 3 9 1 0 1 4 9 4

warping path w

The DTW is the minimum cost among all the warping paths But the number of path is exponential in D Ok, but we can use dynamic programming, with complexity O(D2)

Sistemi Informativi LS 13

From the d matrix, incrementally build a new matrix WP, whose elements wpi,j are recursively defined as:

7 3 4 5 2 1 d 25 16 25 36 16 1 4 9 0 1 2 0 1 4 1 4 3 1 4 9 0 1 2 4 9 16 1 0 1 0 1 4 1 4 3 9 1 0 1 4 9 4 7 3 4 5 2 1 WP 40 22 31 43 24 15 15 14 10 1 1 2 6 6 5 2 5 3 7 9 2 6 2 11 18 3 6 1 8 8 7 4 3 6 5 5 8 4

11 18

10 19

Sistemi Informativi LS 14

Monday was a holiday Power-Demand time teries Each sequence corresponds to a weeks demand for power Wednesday was a holiday in a Dutch research facility in 1997

Sistemi Informativi LS

15

We have now 2 problems to face, if we want to use DTW for searching:

1. Computing the DTW is very time-consuming 2. How to index it?

1. Use a lower-resolution approximation of the time series

However the method can introduce false dismissals

22.7 sec

1.3 sec

Sistemi Informativi LS

16

An effective indexing technique for DTW has been proposed in [Keo02] The method applies only if we have some global constraint on the allowed warping paths q s

7 3 7 6 10 1 1 2 5 2 5 3 9 2 6 2 1 3 4 4 5 2 1 WP 43 24 17 11 18 3 8 8 7 8 7

11 18

Sistemi Informativi LS

17

The idea is to create an envelope, whose size depends on h, of the query q U Ui = max{qi-h,, qi+h} Li = min{qi-h,, qsi+h} q L

then each time series s in the DB is approximated using PAA a distance function between an approximation of the query envelope (which depends on the window size W of PAA) and the PAA representation s of s is then defined it is proved that this distance function lower bounds dDTW and that PAA approximations can be indexed by an R-tree

Sistemi Informativi LS

18

Two datasets (left: synthetic; right: a mix of real data)

1

0.8 0.6 0.4 0.2 0 210 212 214 216 218 220 210

212

214

216

218

220

DB size

Sistemi Informativi LS

DB size

19

Final considerations

We have just seen some basic techniques to deal with (large) time series databases Other relevant problems exist and have attracted interest, among which:

Searching for similar sub-sequences Searching for multi-dimensional time series (i.e., trajectories)

Sistemi Informativi LS

20

- Beam Forming for ImagingUploaded bysayantibardhan
- m12379Uploaded byFikrul hakim
- 7.Block-Based Feature-Level Multi-Focus Image FusionUploaded bysijdsk
- 7Uploaded bymhlmk
- Problem Books in Mathematics Functional EquationsUploaded byHamid Farhadi
- Cardiac Analyser based on LabVIEWUploaded byIJSTE
- PMU Based Midterm Stability Evaluation of Wide Area Power SystemUploaded byHema Roy
- 2009 - Distance Relaying Algorithm Using a DFT-Based Modified Phasor EstimationUploaded byEubis_Machado
- 05729570Uploaded byMekaTron
- Chapter 05b Image Restoration (Linear Restoration)Uploaded byTekyui - paster
- Fourier Series/TransformUploaded bySaad Khaliq
- FFT descreeningUploaded byalexpanek
- Noncontact capture of pilling profile on fabric surface - objective assessment methodUploaded byJASH MATHEW
- Yojana MamUploaded byHafizuddin Syed
- Wavelet GLCMUploaded byindorayabt
- 6. Electrical - IJEEE-IJEEE-Detecting Changes in Synthetic - Maryura M. ManeUploaded byiaset123
- FftUploaded byAnonymous sDiOXHwPPj
- Computation of Power of a Signal in Matlab – Simulation and VerificationUploaded byShariful Azam
- ISSPA Paper From IEEE SiteUploaded byrcherr
- ListUploaded byDeepak Kumawat
- epilepsy research paperUploaded bykulbhushan_chand
- Ec2045 Satellite Communication l t p c 3 0 0 3Uploaded bySuresh Kumar
- IEC61850-9-2 Process Bus Implementation on IEDsUploaded byraghavendran raghu
- DSP IMP QuestionsUploaded byAshok Battula
- Coal Flame CharacterizationUploaded byAditya Budi Fauzi
- 1-s2.0-S0306261912000657-main.pdfUploaded byAditya Budi Fauzi
- Maria Petrou, Costas Petrouauth. Image Processing the Fundamentals, Second EditionUploaded byngu
- Schoerkhuber_JAES_2013Uploaded byClaudio Parauta
- dip labUploaded bymohan vanapalli
- DTSP QB UploadUploaded byDr.EZHILARASI P

- The substratum in Insular CelticUploaded byAdyghe Tamar Chabadi
- Writing_More_and_Less_Jewishly_in_Judezm.pdfUploaded byDaniel Fonnesu
- The_origin_of_the_name_Sepharad_a_new_in.pdfUploaded byDaniel Fonnesu
- a-short-bibliography-of-childrens-books-in-latin.pdfUploaded byDaniel Fonnesu
- Lesson 7Uploaded byDaniel Fonnesu
- Shuichiro_Nakao_Early_steps_to_Juba_Arab.pdfUploaded byDaniel Fonnesu
- Kon Ta Bisa Na PapiamentuUploaded byDaniel Fonnesu
- 2008-Indo-European Languages Tree by Levenshtein DistanceUploaded byDaniel Fonnesu
- Ollendorf TupiUploaded byDaniel Fonnesu
- lingua franca glossary4.pdfUploaded byDaniel Fonnesu
- Lingua Franca TextsUploaded byDaniel Fonnesu
- Grammer SpellingUploaded byDaniel Fonnesu
- Icelandic and GermanUploaded byDaniel Fonnesu
- pericla_navarchi_magonisUploaded byDaniel Fonnesu
- Shakespeare Iulius CaesarUploaded byDaniel Fonnesu
- chronicleserior01ocogoog_djvu_6hUploaded byDaniel Fonnesu
- Lesson 10Uploaded byDaniel Fonnesu
- Lesson 9Uploaded byDaniel Fonnesu
- Lesson 8Uploaded byDaniel Fonnesu
- Lesson 6Uploaded byDaniel Fonnesu
- Lesson 5Uploaded byDaniel Fonnesu
- Lesson 4Uploaded byDaniel Fonnesu
- Lesson 3Uploaded byDaniel Fonnesu
- Lesson 2Uploaded byDaniel Fonnesu
- Lesson 1Uploaded byDaniel Fonnesu
- Kalderash Secondary A2 at EngUploaded byDaniel Fonnesu
- Kalderash Secondary A1 at EngUploaded byDaniel Fonnesu

- XDGA+SYBIOTICA_PanelUploaded byMica Mico
- FSSS.pdfUploaded bymohitjaiswal12
- lb1923Uploaded byPhạm Tuấn Anh
- 10. Multi-criteria Evaluation 2018Uploaded byJuan Antonio Araiza Aguilar
- Transacciones LETRAUploaded byJose E Lopez
- Running Feeder and Leger RigUploaded byclazar
- LA COSTANERA SUR DE BUENOS AIRES – BORDE Y HORIZONTE DE LA CIUDADUploaded byPoker_87
- Training and Development (1)Uploaded byItulung Kauring
- improvements done in the diese locoUploaded byMvk Chaitanya
- Master Certificate in Computer Aided EngineeringUploaded by227799
- CO CO88 JPN Execute Collective SettlementUploaded bynguyencaohuy
- inclusive a2 - 17994910 parsa qureshiUploaded byapi-357689332
- Fracpro XchangeUploaded byMario Fabris
- Journal of Arab & Muslim Media Research 1.1Uploaded byIntellect Books
- Strategic Scientific and Medical WritingUploaded byebookecm.it
- Vision-Based Hand Gesture Recognition Using Com Bi National FeaturesUploaded bysuganbaby
- Article Critique Observing Bullying at SchoolUploaded bysalyandrea5108
- On the Improvement of the Understanding Baruch Spinoza.pdfUploaded bypattyvcn
- Bm v1604 Overview en UsUploaded byMuhammad Afzal
- 01 Laboratory Exercise 1Uploaded byMeterpreter Tcpdump
- Suspension Design ReportUploaded byMohit Kumar
- Https Tutorials Iq Harvard Edu R Rintro Rintro HTMLUploaded byxaxax
- 29011526 Human Resource Planning PptUploaded byShaifaliChauhan
- Sloka Krishnan - RésuméUploaded byslokakrishnan
- 288 A1 Course Outline Komar F12 (4)Uploaded byjrubinovitch
- Komal KhilariUploaded byAkshay Pawar
- Word Wall Forth Grade MathUploaded byAnonymous WynYbw
- file_134_2073Uploaded byGunadevan Chandrasekaran
- Piaget's TheoryUploaded byEevae
- hrmUploaded byBurhan Ahmed