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
生成検索エンジン最適化に関する研究の紹介
ynakano
2
1.3k
アナログ計算機『計算尺』を愛でる Midosuji Tech #4/Analog Computing Device Slide Rule now and then
quiver
1
230
データベース02: データベースの概念
trycycle
PRO
2
870
機械学習 - SVM
trycycle
PRO
1
870
マウス肝炎ウイルス感染の遺伝子発現へのテンソル分解の適用によるSARS-CoV-2感染関連重要ヒト遺伝子と有効な薬剤の同定
tagtag
0
130
コンピュータビジョンによるロボットの視覚と判断:宇宙空間での適応と課題
hf149
0
260
データベース03: 関係データモデル
trycycle
PRO
1
240
データベース14: B+木 & ハッシュ索引
trycycle
PRO
0
420
機械学習 - ニューラルネットワーク入門
trycycle
PRO
0
840
白金鉱業Meetup Vol.16_【初学者向け発表】 数理最適化のはじめの一歩 〜身近な問題で学ぶ最適化の面白さ〜
brainpadpr
11
2.3k
データマイニング - ノードの中心性
trycycle
PRO
0
250
安心・効率的な医療現場の実現へ ~オンプレAI & ノーコードワークフローで進める業務改革~
siyoo
0
300
Featured
See All Featured
Fireside Chat
paigeccino
38
3.6k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Mobile First: as difficult as doing things right
swwweet
223
9.9k
Java REST API Framework Comparison - PWX 2021
mraible
33
8.8k
Adopting Sorbet at Scale
ufuk
77
9.5k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
800
The Language of Interfaces
destraynor
158
25k
Building a Modern Day E-commerce SEO Strategy
aleyda
43
7.4k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
6k
Balancing Empowerment & Direction
lara
1
540
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
139
34k
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