7 views

Uploaded by Daniel Fonnesu

Time series

- InTech-Biomedical Image Volumes Denoising via the Wavelet Transform
- An Energy Efficient and High Speed Image Compression System Using Stationary Wavelet Transform
- gallegatimmf2013.pdf
- An Accurate Fault Detection and Location on Transmission Line Using Wavelet Based on Clarke Transformation
- fpga.pdf
- Presentation
- Quality Assessment in Image Compression by using Fast Wavelet Transformation with 2D Haar Wavelets
- Comparative Study of Neural Network Based Speech Recognition: Wavelet Transformation vs. Principal Component Analysis
- Ber Performance of Ofdm With Discrete Wavelet Transform for Time Dispersive Channel
- Pressed Version
- Ecg en Labview
- Atmospheric Correction of Remotely Sensed Images in Spatial and Transform Domain
- A New Variable Threshold and Dynamic Step Size Based Active Noise Control System for Improving Performance
- complete updated annotated bib
- Image Processing Assignment 2 2012
- Digital image processing using matlab: filters (detail)
- TE Electrical syllabus
- Lecture 6
- FFT Algorithm
- IRJET-Digital Image Watermarking using Discrete Wavelet Transform

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

- InTech-Biomedical Image Volumes Denoising via the Wavelet TransformUploaded byMansoor Companywala
- An Energy Efficient and High Speed Image Compression System Using Stationary Wavelet TransformUploaded byEditor IJRITCC
- gallegatimmf2013.pdfUploaded byfredsv
- An Accurate Fault Detection and Location on Transmission Line Using Wavelet Based on Clarke TransformationUploaded byMAKMUR SAINI
- fpga.pdfUploaded bylmaraujo67
- PresentationUploaded byshashi4656
- Quality Assessment in Image Compression by using Fast Wavelet Transformation with 2D Haar WaveletsUploaded byAnonymous kw8Yrp0R5r
- Comparative Study of Neural Network Based Speech Recognition: Wavelet Transformation vs. Principal Component AnalysisUploaded byWorld of Computer Science and Information Technology Journal
- Ber Performance of Ofdm With Discrete Wavelet Transform for Time Dispersive ChannelUploaded byInternational Journal of Research in Engineering and Technology
- Pressed VersionUploaded bymyongkee
- Ecg en LabviewUploaded byHarold David Gil Muñoz
- Atmospheric Correction of Remotely Sensed Images in Spatial and Transform DomainUploaded byAI Coordinator - CSC Journals
- A New Variable Threshold and Dynamic Step Size Based Active Noise Control System for Improving PerformanceUploaded byijcsis
- complete updated annotated bibUploaded byapi-309377976
- Image Processing Assignment 2 2012Uploaded byAvinash Hegde
- Digital image processing using matlab: filters (detail)Uploaded byThanh Nguyen
- TE Electrical syllabusUploaded byVijaySaraf
- Lecture 6Uploaded bygigartukuda
- FFT AlgorithmUploaded bymounica
- IRJET-Digital Image Watermarking using Discrete Wavelet TransformUploaded byIRJET Journal
- Harmonics MeasurmentUploaded bykashif
- Very Good FourierUploaded bymaitham100
- Introduction to Matlab1Uploaded byAnkit Prusty
- Contra Based FusionUploaded byAnantha Raja
- Detecting Walking Gait Impairment With an Ear-Worn SensorUploaded byTaufique Sayeed
- DigitHologr&ImgProcCover&TOCUploaded byAnonymous FGY7go
- Fourier TransformUploaded byArnav Mendiratta
- Enchancing Orchestration Technique via Spectrally Based Linear Algebra Methods 2Uploaded byYork R
- Sparsity-aware, channel order-blind pilot placement with channel estimation in orthogonal frequency division multiplexing systemsUploaded byhendra
- Dsp Theory1Uploaded byMadhan kumar

- incendiesUploaded byDaniel Fonnesu
- Un Cas Especial en La Traduccio de La Variacio Linguistica La Variacio LatentUploaded byDaniel Fonnesu
- The_origin_of_the_name_Sepharad_a_new_in.pdfUploaded byDaniel Fonnesu
- Comunita Dialettofone Italiane in America Latina (2)Uploaded byDaniel Fonnesu
- Cantiamo l'Italiano.pdfUploaded byDaniel Fonnesu
- juo_bananere_galabaro.pdfUploaded byDaniel Fonnesu
- Seis personagens à procura de um autor - PrefácioUploaded byDaniel Fonnesu
- El Reto Del Dialecto Il Pasticciaccio de Gadda Al Espanol, Al Ingles y Al CatalanUploaded byDaniel Fonnesu
- Ugo Dessy - Sardegna Un'Isola Per i MilitariUploaded byDaniel Fonnesu
- ANDREINI Giovan Battista Lo SchiavettoUploaded byDaniel Fonnesu
- a-short-bibliography-of-childrens-books-in-latin.pdfUploaded byDaniel Fonnesu
- U GASO DU POETA, BARBIERE I GIURNALISTE JUÓ BANANÉREUploaded byDaniel Fonnesu
- Animali e Modi Di DireUploaded byDaniel Fonnesu
- Shuichiro_Nakao_Early_steps_to_Juba_Arab.pdfUploaded byDaniel Fonnesu
- Genie Migrom conta sua históriaUploaded byDaniel Fonnesu
- The substratum in Insular CelticUploaded byAdyghe Tamar Chabadi
- Traduzir o Finnegans Wake, Paradoxos e LiberdadesUploaded byDaniel Fonnesu
- Kon Ta Bisa Na PapiamentuUploaded byDaniel Fonnesu
- Kon Ta Bisa Na PapiamentuUploaded byDaniel Fonnesu
- Proto-GasconUploaded byDaniel Fonnesu
- Proto-GasconUploaded byDaniel Fonnesu
- Proto-GasconUploaded byDaniel Fonnesu
- principin_asturianoUploaded byDaniel Fonnesu
- Koine_dialettale_dialetto_di_koine_proce.pdfUploaded byDaniel Fonnesu
- Ollendorf TupiUploaded byDaniel Fonnesu
- La lingua còrsa riassume le parlate locali di tutta l'ItaliaUploaded byDaniel Fonnesu
- woordenlijst_nederlands_-_papiamentuUploaded byDaniel Fonnesu
- Ortografia di PapiamentoUploaded byDaniel Fonnesu
- 2008-Indo-European Languages Tree by Levenshtein DistanceUploaded byDaniel Fonnesu
- Shuichiro_Nakao_Early_steps_to_Juba_Arab.pdfUploaded byDaniel Fonnesu

- 3 ICRIET-106Uploaded byIsma Iba
- RMAA 6.0 User's GuideUploaded byhenrykylaw
- Rrc Measurement Cheat SheetUploaded byleecher3x
- 2017 18 Sem2 Handout EEE INSTR F242 Control SystemsUploaded byNihal Gupta
- digital communicationUploaded byAnandhi Srinivasan
- Chapter 9 Adaptif Delta ModUploaded byDhanneswara Yoga
- How to Set Up Active CrossoversUploaded bygotti45
- Maag Eq4 Manual EnUploaded byMariano Martin Paulini
- Beta 10,20,40,50,C250,C360 OM final (rev 6-30-04)Uploaded byMaxwuell Smart
- Using Digital FiltersUploaded byLeonardo Miguel
- [IJCST-V4I4P44]:T. Kalaiselvi, S. Boopathiraja, P. SriramakrishnanUploaded byEighthSenseGroup
- ssg_m2l5Uploaded byDickson Xavier
- signalprocessing_reu11.pptUploaded byAjay Sharma
- DSP Lecture NotesUploaded bymannmadhan
- Lecture 7 - Filter Design Techniques (Part 1)Uploaded byAamir Sultan
- pioneer souUploaded byJennifer Brown
- Soundcraft_Guide_To_Mixing_1110Uploaded bypewter6292
- Dpcm for Quantized Block Based Compressed Sensing of ImagesUploaded bysoolanig
- Fourier vs WaveletUploaded byarwachinschool
- Ffe Dfe ExcerptUploaded bySaujal Vaishnav
- 20 Tips on Using Effects and Processors in the MixUploaded bydavid.lewsey3138
- Experiment 3Uploaded bynikhil
- Electronic and Communications Principles by Blake chapter 4 answersUploaded byJPaulo Dandan
- TDA1072A.pdfUploaded byDimitry Primochenjko
- FooCDtect [Full].LogUploaded byDinesh Kumar
- Gaussian Noise FilterUploaded byRavindra Aher
- ad8310Uploaded byfer50425
- Chapter_5_Part2_DT Signals & Systems.pptUploaded byReddy Babu
- Rocktron Utopia G100 - Owner's GuideUploaded byIvan Jones
- Digital Control of Switching Mode Power Supply Simone Buso 2Uploaded byAhmed58seribegawan