Download C - Faculty of Computer Science & Engineering

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Course: Decision Support Systems
Appendix A:
An Overview on Time Series Data
Mining
Duong Tuan Anh
Faculty of Computer Science & Engineering
Ho Chi Minh City University of Technology
October 2009
1
An Overview on Time series Data Mining
Outline
1. Introduction
2. Similarity Search in Time Series Data
3. Feature-based Dimensionality Reduction
4. Discretization
5. Other Time Series Data Mining Tasks
6. Conclusions
2
Introduction
25.1750
25.2250
25.2500
25.2500
25.2750
25.3250
25.3500
25.3500
25.4000
25.4000
25.3250
25.2250
25.2000
25.1750
..
..
24.6250
24.6750
24.6750
24.6250
24.6250
24.6250
24.6750
24.7500
A time series is a collection of observations
made sequentially in time.
29
28
27
26
25
24
23
0
50
100
150
200
250
300
350
400
450
500
Examples: Financial time series, scientific time
series
3
Time series Similarity Search
Some examples:
- Identifying companies with similar patterns of growth.
- Determining products with similar selling patterns
- Discovering stocks with similar movement in stock prices.
- Finding out whether a musical score is similar to one of a set
of copyrighted scores.
4
Time series Similarity Search
Distance Measures
• Euclidean distance
• Dynamic Time Warping
• Other distance measures
5
Euclidean Distance Metric
Given two time series
Q = q1…qn
and
C = c1…cn
their Euclidean distance is
defined as:
DQ, C    qi  ci 
n
i 1
C
Q
2
D(Q,C)
6
Dynamic Time Warping (Berndt et al.)
Dynamic Time Warping is a technique that finds the optimal
alignment between two time series if one time series may be
“warped” non-linearly by stretching or shrinking it along its time
axis.
This warping between two time series can be used or to determine
the similarity between the two time series.
Fixed Time Axis
“Warped” Time Axis
Sequences are aligned “one to one”.
Nonlinear alignments are possible.
7
Dynamic Time Warping
• DTW facilitates the discovery of flexible patterns
from time series.
• DTW is used in speech regcognition to determine if
two waveforms represent the same spoken phrase.
• Disadvantage: Dynamic programming High
computational complexity
• Recently, there has been a lot of research work in
improving DTW efficiency.
8
Feature-based Dimensionality Reduction
• Time series databases are often extremely large.
Searching directly on these data will be very
complex and inefficient.
• To overcome this problem, we should use some of
transformation methods to reduce the magnitude of
time series.
• These transformation methods are called
dimensionality reduction techniques.
9
•Let denote a time series query as T = t1,…,tn, and the set of
time series which constitute the database as Y = {Y1,…YK}.
We assume each sequence in Y is n units long.
• Let N be the dimensionality of the transformed space we wish
to index (1 ≤ N ≤ n). For convenience, we assume that N is a
factor of n.
• CRatio = N/n is the compression ratio.
10
An Example of a
Dimensionality Reduction
Technique I
C
0
20
40
60
80
n = 128
100
120
140
Raw
Data
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
…
The graphic shows a
time series with 128
points.
The raw data used to
produce the graphic is
also reproduced as a
column of numbers (just
the first 30 or so points are
shown).
11
An Example of a
Dimensionality Reduction
Technique II
C
0
20
40
60
80
100
120
..............
140
Raw
Data
Fourier
Coefficients
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
…
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
...
We can decompose the
data into 64 pure sine
waves using the Discrete
Fourier Transform (just the
first few sine waves are
shown).
The Fourier Coefficients
are reproduced as a
column of numbers (just
the first 30 or so
coefficients are shown).
12
An Example of a
Dimensionality Reduction
Technique IIII
C
C’
0
20
40
60
80
100
120
140
Raw
Data
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
…
Sorted
Truncated
Fourier
Fourier
Coefficients Coefficients
1.5698
1.0485
0.7160
0.8406
0.3709
0.1670
0.4667
0.1928
0.1635
0.1302
0.0992
0.1282
0.2438
0.2316
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.2667
0.1928
0.1438
0.1416
13
0
20
40
60
DFT
80 100 120
0
20
40
60
DWT
80 100 120
0
20
40
60 80 100 120
SVD
0
20
40
60 80 100 120
APCA
0
20 40 60 80 100 120
PAA
0
20 40 60 80 100 120
PLA
14
Indexing Time Series
1. For each position in the time series, extract a window of length
w, and create a feature (a point in k-dimensioned space) for it.
2. Note: The points for a time series will constitute a trail in
feature space.
3. Partition the trail into suitable
subtrails - Minimal Bounding
Rectangles (MBR).
4. Store the MBRs in a spatial
index structure.
Query Q
1
6
2
7
3
8
4
9
5
10
Database C
15
Q
…the problem is that we have to look at
every point to find the nearest neighbor..
16
We can group clusters of
datapoints with “boxes”, called
Minimum Bounding Rectangles
(MBR).
R1
R2
R4
R5
R3
R6
R9
R7
R8
We can further recursively group
MBRs into larger MBRs….
17
…these nested MBRs are organized
as a tree (called a spatial access tree
or a multidimensional tree). Examples
include R-tree, R*-tree, M-tree,
Hybrid-Tree etc.
R10
R11
R10 R11 R12
R1 R2 R3
R12
R4 R5 R6
R7 R8 R9
Data nodes containing points
18
Bounding Condition
• In order to ensure completeness (no false dismissals):
dk(X’, Y’) ≤ d(X, Y)
General method of Dimensionality Reduction
1. Select a distance measure d.
2. Design a dimensionality reduction technique dk over the kdimensional reduced space.
3. Produce a distance measure dk over the reduced space, and
prove that it obeys the bounding condition.
19
Discretization
• Discretization of a time series is tranforming it into a
symbolic string.
• The main benefit of this discretization is that there is an
enormous wealth of existing algorithms and data structures
that allow the efficient manipulations of symbolic
representations.
• Lin and Keogh et al. (2003) proposed a method called
Symbolic Aggregate Approximation (SAX), which allows
the descretization of original time series into symbolic
strings.
20
Symbolic Aggregate
Approximation (SAX)
[Lin et al. 2003]
The first symbolic representation
of time series, that allow
 Lower bounding of Euclidean distance
 Dimensionality Reduction
 Numerosity Reduction
baabccbc
21
How do we obtain SAX
C
C
0
40
60
80
100
120
c
First convert the time
series to PAA
representation, then
convert the PAA to
symbols
It take linear time
20
c
c
b
b
a
0
20
b
a
40
60
80
100
baabccbc
120
22
Two parameter choices
C
The word size, in this
case 8
C
0
20
40
1
2
60
3
1
b
a
0
20
4
80
100
5
c
6
7
8
c
c
b
120
3
b
2
1
a
40
60
The alphabet size (cardinality), in this case 3
80
100
120
23
Extended SAX (ESAX)
Lkhagva et al. ,2006
• As Extended SAX is based on SAX, we can get
the mean values of the PAA of time series.
• After obtaining PAA, we have the equal sized
segments and its mean values.
• Then we define max and min values in each
segment.
• Discritize the three values to get a triple of
symbols
24
0
10
ACF
20
FDF
30
FCA
40
ABF
50
FFF
60
DCA
25
iSAX
[Shieh et al. 2008]
(Indexable SAX)
26
Time Series Data Mining tasks
• Similarity Search
• Classification
• Clustering
• Motif Discovery
• Novelty/Anomaly Detection
• Time series visualization
• Time series prediction
27
Phân lớp chuỗi thời gian
Which class does
belong to?
Class A
Class B
•Phân loại dữ liệu chuỗi thời gian thành một số lớp với một số đặc
trưng nhất định.
•Dùng những dữ liệu chuỗi thời gian đã thống kê trong quá khứ để
phân loại dữ liệu trong tương lai
28
Phân lớp chuỗi thời gian (tt.)
• Đã có một số công trình nghiên cứu liên quan đến bài
toán phân lớp dữ liệu chuỗi thời gian.
• Các công trình này tập trung nghiên cứu các mục
tiêu: rút ngắn thời gian xử lý cho các giải thuật phân
lớp, và nâng cao độ chính xác cho kết quả phân lớp.
• Các công trình này có thể kể như:
– cải tiến phương pháp xoắn thời gian động để có một cận
dưới (lower bound) chặt hơn để từ đó phân lớp dữ liệu
chuỗi thời gian chính xác hơn do Keogh &
Ratanamahatana, 2004
– thu giảm số lượng thể hiện (numerosity reduction) nhằm
giảm số lượng mẫu cần so sánh, nhóm Keogh (2006);
– giải thuật phân lớp với thời gian tùy định (anytime
classification) do Keogh và các cộng sự đề ra năm 2006
29
Gom cụm chuỗi thời gian
Gom cụm (clustering) là
phân hoạch dữ liệu thành
các nhóm sao cho các thành
phần trong cụm là tương tự
nhau còn các thành phần
khác cụm là rất khác nhau.
30
Gom cụm chuỗi thời gian (tt.)
• Đã có một số công trình nghiên cứu liên quan đến bài
toán gom cụm dữ liệu chuỗi thời gian.
• Các công trình này thường dựa trên một phương pháp
thu giảm số chiều nào đó.
• Gom cụm dữ liệu chuỗi thời gian dựa trên dữ liệu đã
biến đổi wavelet rời rạc là
– phương pháp được đề xuất bởi Zhang và các cộng sự năm
2006.
– Keogh và các cộng sự, năm 2004, đã đưa ra giải thuật I-Kmeans để thực hiện gom cụm dữ liệu chuỗi thời gian sử
dụng phép biến đổi wavelet;
• Gom cụm dữ liệu chuỗi thời gian dựa trên dữ liệu đã
biến đổi PAA đa mức phân giải: Keogh và các cộng
sự đưa ra năm 2005
31
Nhận dạng chuỗi con bất thường nhất
Chuỗi con bất thường (unusual, abnormal, discord, novel) là
chuỗi con mà khác nhất so với các chuỗi con khác trong một
chuỗi thời gian.
32
Nhận dạng chuỗi con bất thường nhất (tt.)
• Phương pháp HOT SAX, bởi Keogh và các cộng sự năm 2005:
tìm kiếm chuỗi con bất thường nhất trong dữ liệu chuỗi thời
gian bằng giải thuật BFDD (bruce force discord discovery) và
một số heuristic cải tiến (HDD).
• Phương pháp WAT (wavelet and augmented trie) tìm K chuỗi
bất đồng trên dữ liệu chuỗi thời gian sử dụng phép biến đổi
wavelet do Y. Bu, T.W. Leung, A. Fu, và các cộng sự năm
2007.
• Giải thuật AWDD (adaptive window-based discord discovery)
bởi M. C. Chuah và F. Fu năm 2007 dựa vào ý tưởng của
BFDD nhưng cải tiến giải thuật để tìm ra kích thước cửa sổ
trượt; (áp dụng cho dữ liệu chuỗi thời gian ECG).
• Giải thuật DADD (disk aware discord discovery) bởi Yankov
và các cộng sự năm 2007 để tìm những chuỗi con bất thường
nhất trên dữ liệu chuỗi thời gian có kích thước hàng terabyte.
33
Phát hiện mô típ
Mô típ (mẫu lặp) là chuỗi con thường lặp lại nhiều nhất trong
chuỗi thời gian
34
Phát hiện mô típ (tt.)
• Giải thuật EMMA, Lin và các cộng sự,
2002.
• Giải thuật Random Projection, Chiu và các
cộng sự, 2003.
• Giải thuật phát hiện mô típ có thể xác định
chiều dài tối ưu của mô típ (Tanaka, 2007).
35
Hai bài toán TSDM khác
• Dự báo dữ liệu chuỗi thời gian
Neural Network
Neural Network + wavelet transform
• Khám phá luật kết hợp từ dữ liệu chuỗi thời
gian
36
Conclusions
• An overview of recent advances in Time
series data mining
– Feature-based dimensionality reduction
– Discretization
• Further research:
– Empirical comparisons
– Applications in time series data mining
(clustering, classification, finding motifs,
anomaly detection, prediction,etc.)
37
Related documents