Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Prefix and Suffix Invariant Dynamic Time Warping
Search
nel215
February 11, 2017
Science
1
1.8k
Prefix and Suffix Invariant Dynamic Time Warping
nel215
February 11, 2017
Tweet
Share
More Decks by nel215
See All by nel215
Presto Connector を自作した話
nel215
3
1.3k
Other Decks in Science
See All in Science
東大・松尾研主催 LLM Summer 2023 コンペ解法 (11位 – 20位枠での優秀賞)
hayataka88
0
150
同じデータでもP値が変わる話/key_considerations_in_NHST
florets1
1
1.1k
LCG20
lcolladotor
0
170
HAS Dark Site Orientation
astronomyhouston
0
4.8k
Xpenologyなるアングラプロジェクト周りについて語るやつ
sushi514
0
570
Machine Learning for Materials (Lecture 3)
aronwalsh
0
810
Pandas 2 vs Polars vs Dask (PyDataGlobal 2023 December)
ianozsvald
0
360
[NeurIPS 2023 論文読み会] Wasserstein Quantum Monte Carlo
stakaya
0
340
Machine Learning for Materials (Lecture 9)
aronwalsh
0
120
勉強会資料 / “Asymptotic Statistics” Section 2.1
asymptotic_minato
0
210
ChatGPT によるプログラミング授業の課題の解答生成の評価
toskamiya
0
250
B-Cubed: Leveraging analysis-ready biodiversity datasets and cloud computing for timely and actionable biodiversity monitoring
peterdesmet
0
150
Featured
See All Featured
5 minutes of I Can Smell Your CMS
philhawksworth
199
19k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
124
32k
Clear Off the Table
cherdarchuk
82
310k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
28
5.9k
WebSockets: Embracing the real-time Web
robhawkes
59
6.9k
Design by the Numbers
sachag
274
18k
Embracing the Ebb and Flow
colly
78
4.1k
Optimizing for Happiness
mojombo
369
69k
BBQ
matthewcrist
78
8.7k
Designing on Purpose - Digital PM Summit 2013
jponch
109
6.4k
KATA
mclloyd
14
11k
Building a Modern Day E-commerce SEO Strategy
aleyda
15
6.3k
Transcript
Prefix and Suffix Invariant Dynamic Time Warping NIPS・ICDM 2016論文輪読会 大友
雄平 (@nel215)
論文概要 (1/2) • Prefix and Suffix Invariant Dynamic Time Warping
• ICDM 2016 Accepted Short Paper • Session A6: Sequences and Time Series • 論文URL: http://www.cs.ucr.edu/~eamonn/psi_DTW_10pages.pdf • ICDM版の加筆 • 資料内の画像は上記より引用 • Prefix and Suffix Invariant Dynamic Time Warping → PSI-DTW → Ψ-DTW
論文概要 (2/2) • Dynamic Time Warping [Berndt DJ, Clifford J
1994] • 時系列データ間の類似度 (Similarity) を計算する手法 • 異なる長さの時系列にも適用可能 • 高速化のためのLower Boundを計算する手法がある • Prefix and Suffix Invariant • DTWを区切り位置が明確ではない時系列データ(ストリームデータなど) に適用すると分類問題などの正解率が悪くなる • DTW を suffix と prefix に対して不変性を与えるアルゴリズムに修正 • Lower Boundについても同様な修正を考案
目次 • 論文概要 • Dynamic Time Warping (DTW) • アルゴリズム
• 問題点・例 • Prefix and Suffix Invariant Dynamic Time Warping (Ψ-DTW) • アルゴリズム • Prefix, Suffixの与える影響 • 比較実験 • Lower Bound • アルゴリズム • 比較実験 • まとめ
Dynamic Time Warping (1/3) • 入力: • 出力: • 漸化式:
時系列データ = 1 , 2 , … , , = 1 , 2 , … , , ∈ ℝ for any ∈ [1, ], ∈ [1, ] 類似度 DTW , = dtw(, ) ※ c(.,.) はコスト関数
Dynamic Time Warping (2/3) 0 1 2 3 4 5
6 0 0 ∞ ∞ ∞ ∞ ∞ ∞ 1 ∞ 2 ∞ 3 ∞ 4 ∞ 5 ∞ 6 ∞ = =
Dynamic Time Warping (3/3) 0 1 2 3 4 5
6 0 0 ∞ ∞ ∞ ∞ ∞ ∞ 1 ∞ 2 ∞ 3 ∞ 4 ∞ 5 ∞ 6 ∞ = = dtw(3,2)=c(3 , 2 )+minቐ dtw(2,2) dtw(3,1) dtw(2,1) DTW(, )=dtw(6,6)
Dynamic Time Warping の問題点 • 区切り位置が明確でない場合にPrefixやSuffixの影響を受ける
Ψ-DTW (1/3) • 入力: • 出力: • 漸化式: 時系列データ =
1 , 2 , … , , = 1 , 2 , … , Relaxation Factor ∈ ℕ , ∈ ℝ for any ∈ [1, ], ∈ [1, ] 類似度
Ψ-DTW (2/3) 0 1 2 3 4 5 6 0
0 0 0 ∞ ∞ ∞ ∞ 1 0 2 0 3 ∞ 4 ∞ 5 ∞ 6 ∞ = = ※r=2の場合
Ψ-DTW (3/3) 0 1 2 3 4 5 n 0
0 0 0 ∞ ∞ ∞ ∞ 1 0 2 0 3 ∞ 4 ∞ 5 ∞ m ∞ = = ※r=2の場合 Ψ-DTW(x,y,2)=min dtw(4,6) dtw(5,6) dtw(6,4) (6,5) (6,6)
Suffixの与える影響 • suffixを加えた場合の分類正解率 • ※cDTW、Ψ-cDTWは比較位置に制限を加えたバージョン
比較実験 (1/3) • 各データセットに対する分類タスクの Accuracy を評価 • 学習データは端点が分からない状況を想定して 時系列データを連結、k近傍法用の辞書作成の前処理を実施 •
辞書が結果に影響を与えないように辞書作成に使う類似度計算は cDTWで統一
比較実験 (2/3) • Motor Current Data • 特によかったデータセット • 既存手法のAccuracy12%に対して40%以上を達成
※横軸は辞書時系列の長さ
比較実験 (3/3) • その他データセット • 各手法で最も良かった辞書時系列長の結果 • 4/6のデータセットで提案手法が良好な結果
Lower Bound • k近傍法などで高速化のために利用 ※KDD2016 Tutorial(http://www.cs.unm.edu/~mueen/DTW2.pdf)より引用
LB_Keogh (1/2) • ベースとなる既存手法 [E. Keogh, et. al. 2005] •
一方の時系列qに対してenvelop U, Lを計算する ※nは時系列の長さ
LB_Keogh (2/2) • 他方の時系列tがenvelopからはみ出た部分をLower Boundとする LB_Keogh(, )=σ =1 ቐ −
2, if > − 2, if < 0 otherwise ※コスト関数が差の2乗の場合
Ψ-LB_Keogh • 前後 r 個を計算せずPrefixとSuffixに対してInvariantにする Ψ-LB_Keogh(, , )=σ =1+ −
ቐ − 2, if > − 2, if < 0 otherwise ※ r : Relaxation Factor ※コスト関数が差の2乗の場合
Tightness • 各 Lower Bound/DTW で計算した値を比較 • 既存手法と同様の傾向 • 既存手法より良かったケースが1つ
まとめ • 課題 • 区切りが明確ではないデータに対してDTWの性能が良くない • 手法 • PrefixとSuffixに対してInvariantなΨ-DTWを提案 •
Lower Boundについても同様にΨ-LB_Keoghを提案 • Relaxation FactorでInvariantを制御 • 結果 • 4/6のデータセットでAccuracyが改善 • Motor Current Data データセットでは約30ポイントの改善
参考資料等 • DTW/LB_Keogh の出典 • Berndt DJ, Clifford J (1994)
Using dynamic time warping to find patterns in time series. In: KDD workshop, pp 359–370 • Keogh EJ, Ratanamahatana CA (2005) Exact indexing of dynamic time warping. Knowl Inf Syst 7(3): 358–386 • DTW等の性能比較論文 • http://didawikinf.di.unipi.it/lib/exe/fetch.php/dm/time_series_comp arison_2012.pdf • KDD2016のDTWに関するチュートリアル • http://www.cs.unm.edu/~mueen/DTW1.pdf • http://www.cs.unm.edu/~mueen/DTW2.pdf