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
2k
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
How To Buy, Verified Venmo Accounts in 2025 This year
usaallshop68
2
110
サイゼミ用因果推論
lw
1
7.3k
動的トリートメント・レジームを推定するDynTxRegimeパッケージ
saltcooky12
0
140
地表面抽出の方法であるSMRFについて紹介
kentaitakura
1
730
butterfly_effect/butterfly_effect_in-house
florets1
1
180
データベース05: SQL(2/3) 結合質問
trycycle
PRO
0
700
生成検索エンジン最適化に関する研究の紹介
ynakano
2
1k
創薬における機械学習技術について
kanojikajino
16
5.3k
04_石井クンツ昌子_お茶の水女子大学理事_副学長_D_I社会実現へ向けて.pdf
sip3ristex
0
490
オンプレミス環境にKubernetesを構築する
koukimiura
0
260
白金鉱業Meetup Vol.16_【初学者向け発表】 数理最適化のはじめの一歩 〜身近な問題で学ぶ最適化の面白さ〜
brainpadpr
11
2.2k
SciPyDataJapan 2025
schwalbe10
0
240
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1370
200k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Become a Pro
speakerdeck
PRO
28
5.4k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
Reflections from 52 weeks, 52 projects
jeffersonlam
351
20k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
16
940
Fireside Chat
paigeccino
37
3.5k
Building Flexible Design Systems
yeseniaperezcruz
328
39k
Intergalactic Javascript Robots from Outer Space
tanoku
271
27k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.8k
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