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
小杉考司(専修大学)
kosugitti
2
620
03_草原和博_広島大学大学院人間社会科学研究科教授_デジタル_シティズンシップシティで_新たな_学び__をつくる.pdf
sip3ristex
0
170
地表面抽出の方法であるSMRFについて紹介
kentaitakura
1
350
マテリアルズ・インフォマティクスの先端で起きていること / What's Happening at the Cutting Edge of Materials Informatics
snhryt
1
190
大規模言語モデルの開発
chokkan
PRO
85
43k
Machine Learning for Materials (Challenge)
aronwalsh
0
210
LIMEを用いた判断根拠の可視化
kentaitakura
0
440
ACL読み会2024@名大 REANO: Optimising Retrieval-Augmented Reader Models through Knowledge Graph Generation
takuma_matsubara
0
150
機械学習を支える連続最適化
nearme_tech
PRO
1
260
[第62回 CV勉強会@関東] Long-CLIP: Unlocking the Long-Text Capability of CLIP / kantoCV 62th ECCV 2024
lychee1223
1
860
大規模言語モデルの論理構造の把握能力と予測モデルの生成
fuyu_quant0
0
100
拡散モデルの原理紹介
brainpadpr
3
6k
Featured
See All Featured
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
1.1k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Mobile First: as difficult as doing things right
swwweet
223
9.5k
Building a Scalable Design System with Sketch
lauravandoore
461
33k
What's in a price? How to price your products and services
michaelherold
244
12k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
RailsConf 2023
tenderlove
29
1k
Unsuck your backbone
ammeep
669
57k
Practical Orchestrator
shlominoach
186
10k
Scaling GitHub
holman
459
140k
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