23
Clustering of Time Series Subsequences is Meaningless: Implications for Previous and Future Research NTS 2011/3/1 増増 Copyright (C) 2011 Denso IT Laboratory, Inc. All Rights Reserved.

Clustering of time series subsequences is meaningless 解説

Embed Size (px)

DESCRIPTION

UCRのKeoghらの時系列クラスタリングに関する論文の解説。Keogh, Eamonn, and Jessica Lin. "Clustering of time-series subsequences is meaningless: implications for previous and future research." Knowledge and information systems 8.2 (2005): 154-177.

Citation preview

Page 1: Clustering of time series subsequences is meaningless 解説

Clustering of Time Series Subsequences is Meaningless: Implications for Previous and Future

Research

NTS 2011/3/1増谷

Copyright (C) 2011 Denso IT Laboratory, Inc. All Rights Reserved.

Page 2: Clustering of time series subsequences is meaningless 解説

時系列クラスタリング• 様々な分野で活用– Biology,Finance,Geology,Space

Exploration,Robotics,Human motion analysis– クラスタリングは前処理、サブルーチンとし

て良く使われる– Rule discovery, indexing, classification,

prediction,anomaly detection.• 使っている人?

Copyright (C) 2011 Denso IT Laboratory, Inc. All Rights Reserved.

Page 3: Clustering of time series subsequences is meaningless 解説

2 種類の時系列クラスタリング• 分割されたクラスタを使うパターン– 1日ごとの集計とか

• Moving Window を使うパターン– 過去数ステップの細切れ時系列を使うとか

Copyright (C) 2011 Denso IT Laboratory, Inc. All Rights Reserved.

Page 4: Clustering of time series subsequences is meaningless 解説

概要• “Clustering of Time Series Subsequences is

Meaningless: Implications for Previous and Future Research”, Eamonn Keogh, Jessica Lin Knowledge and Information Systems, 2005

• 時系列のクラスタリングのうち、 Moving Window を用いるものは意味がない– クラスタリングをしても意味の無い結果にな

る– どんなクラスタリング、データに対しても同

じ結果 Copyright (C) 2011 Denso IT Laboratory, Inc. All Rights Reserved.

Page 5: Clustering of time series subsequences is meaningless 解説

クラスタ集合間距離

クラスタ集合間距離

クラスタ集合

クラスタ集合Aの各クラスタ中心は B のクラスタと対応させる

A B

Copyright (C) 2011 Denso IT Laboratory, Inc. All Rights Reserved.

Page 6: Clustering of time series subsequences is meaningless 解説

サンプルデータ• 3 random restart• X : stock market dataset

• Y : random walk dataset

�̂� 1 �̂� 2 �̂� 3

𝑌 1 𝑌 2 𝑌 3

Copyright (C) 2011 Denso IT Laboratory, Inc. All Rights Reserved.

Page 7: Clustering of time series subsequences is meaningless 解説

restart

• セット内距離

• セット間距離

• クラスタ意味あり度合

Copyright (C) 2011 Denso IT Laboratory, Inc. All Rights Reserved.

Page 8: Clustering of time series subsequences is meaningless 解説

クラスタ意味あり度合

• ランダムな restart をしても同じような結果が得られる場合0に近づく

• まったく関係の無いクラスタとの距離(基準):比較的大きいはず

• 意味のあるクラスタリングでは、 CM は0に近くなるはず

Copyright (C) 2011 Denso IT Laboratory, Inc. All Rights Reserved.

Page 9: Clustering of time series subsequences is meaningless 解説

実験条件• 2 種類の時系列クラスタリング– STS Clustering : Sliding window で抽出 – Whole clustering : ランダムに抽出

• K={3,5,7,10} w={8,16,32}• すべての組み合わせを各 100 回

• S&P の終値時系列データCopyright (C) 2011 Denso IT Laboratory,

Inc. All Rights Reserved.

Page 10: Clustering of time series subsequences is meaningless 解説

結果1: k-means

• STS が大きい値を示す:無意味度が増す

Copyright (C) 2011 Denso IT Laboratory, Inc. All Rights Reserved.

Page 11: Clustering of time series subsequences is meaningless 解説

結果1• STS について、クラスタリングをした結果

同志の距離が、まったく異なるデータでクラスタリングした結果との距離とあまり変わらない

• S&P のデータと、ランダムのデータの結果と区別つかない

Copyright (C) 2011 Denso IT Laboratory, Inc. All Rights Reserved.

Page 12: Clustering of time series subsequences is meaningless 解説

さらに• この定義 (cluster distance) のみならず他の

定義でも同じ結果– Pairwise match, minimum match, maximum

match

Copyright (C) 2011 Denso IT Laboratory, Inc. All Rights Reserved.

Page 13: Clustering of time series subsequences is meaningless 解説

他のアルゴリズムはどうか?• 階層型クラスタリング– Ward 法– Partitioning と同じ

Copyright (C) 2011 Denso IT Laboratory, Inc. All Rights Reserved.

Page 14: Clustering of time series subsequences is meaningless 解説

全く異なる2つの時系列• UCRアーカイブから選ぶ• 置き換えても同じ結果

Copyright (C) 2011 Denso IT Laboratory, Inc. All Rights Reserved.

Page 15: Clustering of time series subsequences is meaningless 解説

そのほかまだまだ• 他の手法(EM、SOMなど)• 42のデータセット• 他のクラスタ指標• 他のシーディング方法• 他のメトリック• さまざまなノーマライズ方法

• ー>  orzCopyright (C) 2011 Denso IT Laboratory,

Inc. All Rights Reserved.

Page 16: Clustering of time series subsequences is meaningless 解説

クラスタセンター• サンプル– 3 つのパターン– 各々30パターン用意

• クラスタセンター– オリジナルに近いはず

Copyright (C) 2011 Denso IT Laboratory, Inc. All Rights Reserved.

Page 17: Clustering of time series subsequences is meaningless 解説

クラスタセンター比較• Whole clustering– オリジナルに近い

• STS clustering– 90 パターンをつなげる– サイン関数– 位相は任意で 予測つかない

Copyright (C) 2011 Denso IT Laboratory, Inc. All Rights Reserved.

Page 18: Clustering of time series subsequences is meaningless 解説

STS クラスタリングのクラスタは

• 元の時系列と無関係にみえる• なぜか、サインカーブを描く• ※ どんなクラスタリングアルゴリズムで

も、どんなデータセットでも

• なぜ、このようなことになるのか?

Copyright (C) 2011 Denso IT Laboratory, Inc. All Rights Reserved.

Page 19: Clustering of time series subsequences is meaningless 解説

Total mean become constant

• K=1 の場合平均は 定数になる

Copyright (C) 2011 Denso IT Laboratory, Inc. All Rights Reserved.

Page 20: Clustering of time series subsequences is meaningless 解説

Trivial match

• オーバーラップした系列が近い

Copyright (C) 2011 Denso IT Laboratory, Inc. All Rights Reserved.

Page 21: Clustering of time series subsequences is meaningless 解説

Sine curve

• Slusty (-1948)– Moving Windows によるスムージングを繰り返

すと、どんな系列もサイン波に収束する• 全く同じでは無いが、似たような理由だろ

う– Future work

Copyright (C) 2011 Denso IT Laboratory, Inc. All Rights Reserved.

Page 22: Clustering of time series subsequences is meaningless 解説

解決法は?• Window のステップを大きくする– 実際やってみると、 s << m の間は効果が無い– S>m とすると Whole clustering となる• s の設定がオフセットにシビアになる

• K を十分大きくしてまずクラスタリング– 結果のクラスタを再度クラスタリング– これも効果が無い( sine カーブになる)

Copyright (C) 2011 Denso IT Laboratory, Inc. All Rights Reserved.

Page 23: Clustering of time series subsequences is meaningless 解説

結論• Moving Window のクラスタリングは– やらない方がいい?

Copyright (C) 2011 Denso IT Laboratory, Inc. All Rights Reserved.