• 検索結果がありません。

情報知識ネットワーク特論 Data Mining 6:

N/A
N/A
Protected

Academic year: 2021

シェア "情報知識ネットワーク特論 Data Mining 6:"

Copied!
59
0
0

読み込み中.... (全文を見る)

全文

(1)

有村博紀,九州大学

情報知識ネットワーク特論 Data Mining 6:

Stream Mining algorithms

有村 博紀

北海道大学大学院 情報科学研究科 コンピュータサイエンス 専攻

email: {arim,kida}@ist.hokudai.ac.jp

http://www-ikn.ist.hokudai.ac.jp/ikn-tokuron/

http://www-ikn.ist.hokudai.ac.jp/~arim

(2)

今日の内容

6

:

ストリームマイニング

ストリームマイニングとは

ストリームに対する近似統計手法

近似カウンティング

ストリームからのアイテム集合発見

半構造データストリーム ポイント

超低メモリアルゴリズム

(3)

有村博紀,九州大学 情報知識ネットワーク特論

データストリームとは

背景

インターネットに代表される高速なネット ワークと大規模センシング技術の発展

データストリーム

新しい大規模データ

時間的に変化する大量のデータが日々 刻々と生成・集積・消費される様子を データの流れとしてとらえたもの

(4)

有村博紀,九州大学 情報知識ネットワーク特論

ストリームデータの例

ネットワークの解析データ

DARPA IDS Evaluation DataSet

(http://www.ll.mit.edu/IST/ideval/)

struct request {

uint32_t timestamp;

uint32_t clientID;

uint32_t objectID;

uint32_t size;

uint8_t method;

uint8_t status;

uint8_t type;

uint8_t server;

};

struct request {

uint32_t timestamp;

uint32_t clientID;

uint32_t objectID;

uint32_t size;

uint8_t method;

uint8_t status;

uint8_t type;

uint8_t server;

};

(telnet, 192.168.1.30, 192.168.0.20) (ftp, 192.168.1.30, 192.168.0.20) (smtp, 192.168.0.40, 192.168.1.30) (auth, 192.168.1.30, 192.168.0.40) (smtp, 192.168.0.40, 192.168.1.30) (shell, 192.168.1.30, 192.168.0.40) (sunrpc, 192.168.0.20, 192.168.1.30 (ftp-data, 192.168.0.20, 192.168.1.30) (ftp-data, 192.168.0.20, 192.168.1.30) (telnet, 192.168.1.30, 192.168.0.20) (ftp-data, 192.168.0.20, 192.168.1.30) (finger, 192.168.1.30, 192.168.0.20) (smtp, 192.168.1.30, 192.168.0.20) (smtp, 192.168.1.30, 192.168.0.20) (http, 192.168.1.30, 192.168.0.40)

(service, host_ip, dist_ip)

小さな答え

• 異なりアイテム数 D 64,636個

• 頻出アイテム(0.1%)D 24個

大きなデータ

• ドメインサイズ U

数10×232×232 (個)

• データサイズ N 300万個 (100MB)

(5)

有村博紀,九州大学 情報知識ネットワーク特論

データストリームの例

金融や流通分野における取引記録(トラ ンザクション・ログ)

電話会社・

Web

サービスプロバイダの通 信記録(

call records, access log

センサー・ネットワークや,オンライン ニュース,経済情報など多数の情報源 から時系列的に生成されるデータ

(6)

データストリームマイニング

通信・流通分野での要求

大規模データストリームから,いつでも望むとき に必要な情報を取り出したい

データストリームの特性

膨大な量のデータが,(massive)

高速なストリームを通じて,(high-speed)

時間的に変化しながら (transient)

終わりなく到着し続ける (unlimited)

従来のデータマイニング技術は,そのま ま適用できない

!

(7)

データストリーム処理研究の歴史

1980年代以前

統計量の外部記憶計算や低メモリデータ構造の研究

1990年代

通信分野でのストリームを対象とした統計処理システム

計算量分野でのストリームアルゴリズムの実証的研究

データベース分野でのストリームに対する連続問い合わせや,

集約計算の研究

次第に注目される

2000年代:ストリームデータマイニング

データストリームを対象としたデータマイニング・機械学習の研 究が盛んに.情報検索や,時系列モデリング分野.

古くて新しい技術

本来,データマイニングは,基幹業務系システムで,日常的な トランザクション処理の履歴データを,データ倉庫に集約・格納 し,意思決定支援に有効活用することから始まった

有村博紀,九州大学 情報知識ネットワーク特論

(8)

ストリームマイニングの仕事

データストリームに対して

アイテム/属性値に対する統計をとる

特徴的なパターンを発見する

分類ルールを構築する/予測する

複数のストリームの相関を求める

トレンドを検出する

データストリーム

(9)

有村博紀,九州大学 情報知識ネットワーク特論

ストリームデータ処理

データストリーム

..

プロセッサ

ドメイン = {1,,U}

アイテム

膨大で高速なデータストリームから,

時間とともに変化するパターンや規則を発 見・抽出し,(マイニングの仕事のとき)

限定された計算資源を用いて働き続ける

ただし,近似的な解でよい

概要データ ヒント

(10)

アウトライン

ストリームデータ

近似カウンティング

Manku & Motwani (VLDB’02)

ストリームからのパターン発見

Hidber (SIGMOD’99)

浅井, 有村, 有川 (ICDM’02)

ストリームに対する近似統計手法

ストリーム統計のいろいろ(Alon, Matias, Szegedy, STOC’96

頻度モーメントの計算手法

まとめ

(11)

有村博紀,九州大学 情報知識ネットワーク特論

関連研究 : SIGKDD 2003 他から

Association Rules: (Chang & Lee, SIGKDD’03)

Finding recent frequent itemsets adaptively over online data streams

Decision Trees: (Wang, Fan, P. S. Yu, J. Han, SIGKDD’03)

Mining concept-drifting data streams using ensemble classifiers

Multiple streams: (Zhu & Shasha, SIGKDD’03)

Efficient elastic burst detection in data streams

Multiple streams: (Babcock & C. Olston, SIGMOD’03)

Distributed Top-K Monitoring

Multiple streams: (Guha, Gunopulos, Koudas, SIGKDD’03)

Correlating synchronous and asynchronous data streams

IDS: (Yamanishi, Takeuchi, Williams, SIGKDD’02)

Online Unsupervised outlier detection using finite mixtures with discounting learning algorithms

IDS: (W. Lee & S. J. Stolfo, Usenix, Security, 1998)

Data Mining Approaches for Intrusion Detection

(12)

まとめ

ストリームデータ

ストリームに対する近似統 計手法

ストリーム統計のいろいろ

頻度モーメントの計算手法

近似カウンティング

Manku & Motwani (VLDB’02)

ストリームからのアイテム 集合発見

半構造データストリーム

浅井, 有村, 有川 (ICDM’02)

ストリームデータ

高速なデータストリームから,

時間変化しながら,連続して供 給される,大量のデータ

ストリームアルゴリズム

膨大で高速なデータストリーム

限定された計算資源を用いて 働き続ける

近似的な解でよい

(13)

近似カウンティング

Approximate Frequency Counts over Data Streams, (Manku, Motwani, Proc. VLDB’02, 2002)

A Simple Algorithm for Finding Frequent Elements in (Streams and Bags, Karp, Papadimitriou, Shenker, Manuscript, Feb. 2003)

領域効率の良い頻出データアイテム発見アルゴリズム, (川副,浅井,有村,DEWS’03, 2003)

(14)

頻出データアイテム発見問題

入力:長さNのアイテム配列 A ,最小頻度値0≦σ≦1

問題:Aでの出現頻度がσ以上のすべての要素を見つけよ.

freqD (p)σ

主記憶 バッファ

外部記憶 N

解集合

1

1 2 item n

frequency 最小頻度σ

(15)

有村博紀,九州大学 情報知識ネットワーク特論

ストリームデータの例

 DARPA IDS Evaluation DataSet

(http://www.ll.mit.edu/IST/ideval/)

struct request {

uint32_t timestamp;

uint32_t clientID;

uint32_t objectID;

uint32_t size;

uint8_t method;

uint8_t status;

uint8_t type;

uint8_t server;

};

struct request {

uint32_t timestamp;

uint32_t clientID;

uint32_t objectID;

uint32_t size;

uint8_t method;

uint8_t status;

uint8_t type;

uint8_t server;

};

(telnet, 192.168.1.30, 192.168.0.20) (ftp, 192.168.1.30, 192.168.0.20) (smtp, 192.168.0.40, 192.168.1.30) (auth, 192.168.1.30, 192.168.0.40) (smtp, 192.168.0.40, 192.168.1.30) (shell, 192.168.1.30, 192.168.0.40) (sunrpc, 192.168.0.20, 192.168.1.30 (ftp-data, 192.168.0.20, 192.168.1.30) (ftp-data, 192.168.0.20, 192.168.1.30) (telnet, 192.168.1.30, 192.168.0.20) (ftp-data, 192.168.0.20, 192.168.1.30) (finger, 192.168.1.30, 192.168.0.20) (smtp, 192.168.1.30, 192.168.0.20) (smtp, 192.168.1.30, 192.168.0.20) (http, 192.168.1.30, 192.168.0.40)

(service, host_ip, dist_ip)

小さな答え

• 異なりアイテム数 D 64,636個

• 頻出アイテム(0.1%)D 24個

大きなデータ

• ドメインサイズ U

数10×232×232 (個)

• データサイズ N 300万個 (100MB)

• メモリサイズ M 数MB

(16)

オンライン&大規模データマイニング のジレンマ

不要なパターン をすてて,できる

だけ主記憶を節 約したい

頻度カウントのた めに,できるだけ

多くのパターンを

メモリに入れた い!

大量のデータ

限られた記憶領域

(17)

有村博紀,九州大学 情報知識ネットワーク特論

オンラインアルゴリズム

LossyCounting

(Manku & Motwani, VOLDB’02)

はじめての

1

パス近似アルゴリズム

最小頻度

σ

とサイズNのデータに対して,

すべての頻出アイテムを,

O(1/σlog N)

領域 で出力する.

近似:いくつかの非頻出アイテムも出力する

基本的アイディア:「ノルマ方式」

最初は,無条件にメモリ上のバッファへ.

出現するたびにカウントを増やす.

一定期間ごとのノルマを達成しなければ,

バッファから脱落する.

(18)

オンラインアルゴリズム

LossyCounting

(Manku & Motwani, VOLDB’02)

freqD (p)≧σ

主記憶 バッファ

アイテム配列 A

外部記憶

解集合

1.ストリームを長さ1/σの ブロックに区切る

2.はじめて出現したら バッファに入れる.

4.出現数が,経過ブロック 数を下回ったらすてる.

長さ1/σ

最小サポート値σ()

3.出現するたびに,カウント を増やす.

(19)

Lossy Counting (M&M ’02)

出現数の総和Sのグラフが,

ブロック数Wのグラフより上 方にある限り,

アイテムは主記憶に残る.

出現数 の総和S

ブロック数W ブロック数W

のグラフ 出現数

の総和S のグラフ

有村博紀,九州大学 情報知識ネットワーク特論

(20)

領域計算量の解析 (Manku&Motwani

‘02)

dn dn dn-1

dn dn-1

di

dn dn-1

di

d2

d1 dn dn-1

di

d2 ...

...

......

...

... ... .........

...

n n-1 i 2 1

) 1 log

( )

3 ( 2

1 B

O N n

H n B

B B

B B

B

n = N/B, B = N/(N*σ)=1/σ 調和級数

B j d

i

j

i

i  

1

(j=1,2,...,n)

B*i 生存期間ごとに分けて調べる

(21)

有村博紀,九州大学 情報知識ネットワーク特論

Lossy Counting アルゴリズム

定理(

Manku & Motwani, VLDB’02)

アルゴリズム

Lossy Counting

1

回の走査で,頻出データアイテム発見 問題を近似的に解く

.

アルゴリズム

Lossy Counting

領域計算量は

O(1/σ log N)

である.

(22)

KPS アルゴリズム

Karp, Papadimitriou, Shenker, Manuscript, 2003)

1

パス近似アルゴリズム

2パスで厳密解(最適方式)

初めて,領域計算量

O(1/σ)

を達成した!

基本的アイディア

「連帯責任」方式

(23)

有村博紀,九州大学 情報知識ネットワーク特論

KPS の 基本的アイディア

「連帯責任」方式

1.

バッファサイズを

M = 1/σ + 1

に設定す

頻出要素は最多でも

1/σ

個しかない ので,それにプラス1する.)

2.

初回の出現は,無条件にバッファに追加.

以降,出現毎にカウントを1ずつ増やす.

3.

バッファがあふれたら,全員からカウントを 1点ずつ引くことを,カウント0の者がでる まで繰り返す.

4.

0点になったら退出!

(24)

KPS の理論的解析

定理3:任意のストリーム

S = S[1..n]

と相対頻

σ in [0,1]

に対して,アルゴリズムKPSは,

S

の走査終了時にすべての頻出アイテムをバッ ファ(メモリ)に含む.

系4:アルゴリズムKPSは,すべての頻出ア イテムを,最適な領域計算量

O(1/σ )

で見つけ る(ただし非頻出なものも見つける).

O(1/σ )より小さなメモリで頻出アイテムすべてを見つけることはできなこ

とが知られている

(25)

(ftp-data,192.168.0.20,192.168.1.30) (ftp-data,192.168.0.20,192.168.1.30) (ftp-data,192.168.0.20,192.168.1.30) (telnet,192.168.1.30,192.168.0.20) (ftp-data,192.168.0.20,192.168.1.30) (finger,192.168.1.30,192.168.0.20) (smtp,192.168.1.30,192.168.0.20) (smtp,192.168.1.30,192.168.0.20) (http,192.168.1.30,192.168.0.40) (ftp,192.168.0.40,192.168.1.30)

(ftp-data,192.168.1.30,192.168.0.40) (ftp-data,192.168.1.30,192.168.0.40) (ftp-data,192.168.1.30,192.168.0.40) (ftp-data,192.168.1.30,192.168.0.40) (ftp-data,192.168.1.30,192.168.0.40) (telnet,192.168.0.40,192.168.1.30)

ネットワークログ マイニング

Algorithm Time(sec) Space(#item)

Naive 60.84 64,636

DoubleScan 100.67 2,893

i(service, host_ip, dist_ip)

* http://www.ll.mit.edu/IST/ideval/

DARPA IDS Evaluation DataSet *

|D|=3,013,862個(100MB 異なりアイテム数=64,636

σ=0.1% (3,014) #Answer=24

有村博紀,九州大学 情報知識ネットワーク特論

(26)

アウトライン

ストリームデータ

近似カウンティング

Manku & Motwani (VLDB’02)

ストリームからのパターン発見

Hidber (SIGMOD’99)

浅井, 有村, 有川 (ICDM’02)

ストリームに対する近似統計手法

ストリーム統計のいろいろ(Alon, Matias, Szegedy, STOC’96

頻度モーメントの計算手法

まとめ

(27)

ストリームからのパターン発見

半構造データストリームから頻出木パターンを発見するた めの効率よいオンラインアルゴリズム

Online Algorithms for Mining Semi-structured Data Stream, T. Asai, H. Arimura, K. Abe, S. Kawasoe, S.

Arikawa, Proc. IEEE ICDM’02, 2002

(28)

<moviedb><movie><title>Godfather</title><yea r>1972</year><directed_by><person><name>F rancis Ford Coppola </name> <birth_name>

Francis Ford Coppola </birth_name>

<date_of_birth> <day> 7 April </day> <year>

1939 </year> <locate> Detroit, Michigan, USA

</locate> </date_of_birth> <mini_biography>

He was born in 1939 in Detroit, USA, but he grew up in a New York </mini_biography>

<sometimes_credited> Thomas Colchart

</sometimes_credited> <sometimes_credited>

Francis Coppola </sometimes_credited>

<filmography> <Producer> <title> Assassination Tango (2002) </title> <title>Pumpkin (2002)

</title><title>No Such Thing (2001)</title>

<title>Another Day (2001) (TV) </title> <title>

Jeepers Creepers (2001)</title> <title>CQ (2001)

</title> <title> Sleepy Hollow (1999)</title>

<title> Goosed (1999/I) </title> <title>Third Miracle, The (1999) </title> <title>Virgin Suicides, The (1999) </title> <title>Florentine, The (1999)

</title> <title>Lanai-Loa (1998) </title> <title>

“First Wave” (1998) </title> <title> Moby Dick (1998) (TV) </title> <title> Outrage (1998) (TV)

</title> <title> Buddy (1997) </title> ……

Background

Emerging applications on Internets

Eg. Network monitoring, web management, e-commerce

Not a static collection but a transient data stream

Unbound, Rapid, Continuous, Time varying

Traditional data mining methods cannot be directly applied.

… …

SAX event stream

(29)

有村博紀,九州大学 情報知識ネットワーク特論

Our Definition of Semi-structured Data Stream :

(depth, label)-pair representation

R

C

B A

C B

A

A C

B

B

1

2

3 4 5

6

7

8

9 10

11

Data tree D

:

<moviedb> <movie> <title>

Godfather </title> <year> 1972

</year> <directed_by> <person>

<name> Francis Ford Coppola

</name> <birth_name> Francis Ford Coppola </birth_name>

<date_of_birth> <day> 7 April

</day> <year> 1939 </year> . . . (0, moviedb), (1, movie), (2, title

“Godfathar”), (2, yaer), (3, “1972”

directed_by), (3, person), (4, nam

“Francis Ford Coppola”), (4,birth_n (5, “Francis Ford Coppola”), (4, data_of_birth), (5, day), (6, “7 Ap (5, year), (6, “1939”), . . .

XML data

(depth, label)-pairs

Semi-structured data stream w.r.t. D

(0,R), (1,A), (2,B), (2,A), (2,C),

(3,B), (1,C), (2,A), (3,B), (3,C), (2,B)

(30)

The Occurrences of a Pattern

Root occurrence list OccD(T) = {2, 8}

• A root occurrence of T:

• The node to which the root of T maps by a matching function

• The root count of T:

• The number of distinct root occurrences of T in D.

r

C

B A

C B

A

A C

B

B

P

1

P

2

A

C B

T D

1

2

3 4 5

6

7

8

9 10

11

(31)

有村博紀,九州大学 情報知識ネットワーク特論

FREQT [Asai et al. (SIAM DM’02, PKDD’02)]

最右拡張を用いた効率のよい順序木の枚挙

最右葉出現の漸増的な更新

Treeminer [Zaki (SIGKDD’02)]

効率のよい順序木の枚挙

我々の研究とは独立

頻出順序木パターンを発見する 効率のよいアルゴリズム

木構造データからの頻出パターン発見手法

(32)

有村博紀,九州大学 情報知識ネットワーク特論

O rdered tree enumeration tree

[Asai et al., SDM’02; Zaki, SIGKDD’02]

A (0,A) B

(0,B)

A A

A B

B A

B B

(1,A) (1,B)

(1,A) (1,B)

B

B A

B

B B

B B B B

B A

(2,A) (2,B)

(1,A) (1,B)

• The root is the empty tree

• Each node is an ordered tree, and has its (d, l)-expansions as its children.

A generalization of set enumeration tree [Bayardo 97] for ordered trees

(33)

有村博紀,九州大学 情報知識ネットワーク特論

Offline vs. Online

1 2 … i n FREQT (Offline) Horizontal Scan

(Level-wise search)

StreamT (Online) Vertical Scan

Data

Pattern size 1

2

k

Data 1 2 … i n

Pattern size 1

2

k

(34)

Sweep branch

The unique path from the root to the current node vi

The algorithm sweeps the sweep branch SB rightwards

Records the occurrences of the candidate patterns on SB

Use root and bottom occurrences

(35)

有村博紀,九州大学 情報知識ネットワーク特論

2

Tree sweeping

technique

# Occurrences

(36)

4

# Occurrences

Tree sweeping

technique

(37)

有村博紀,九州大学 情報知識ネットワーク特論

Various online models

Basic model [Hidber 99]

Sliding window model [Manilla et al. 95]

Forgetting model

[Yamanishi et al. 00]

now past

Window size w i-w+1

time i

time i

time i j

i-j

Forgetting factor: 

Unsuitable to tracking rapid trend changes

(38)

Experiments:

Scalability and effectiveness of forgetting

0 200 400 600 800 1000 1200 1400 1600

0 500000 1000000 1500000 2000000 2500000 3000000 3500000 Number of

Runtime (sec)

1,348 (sec)

3,200,000 (nodes)

scalability

0 200 400 600 800 1000 1200

0 5000 10000 15000 20000 25000

Number of Nodes

Number of Candidates

基本型

忘却型(γ=0.99)

weblog soap weblog

Effectiveness of forgetting

Data size: 130MB

# of nodes: 3,185,138

# of labels: 72

(39)

有村博紀,九州大学 情報知識ネットワーク特論

決定木のオンライン構築

VFDT (vary fast Decision Tree Learner) [Domingos, Hulten, KDD'00]

決定木を根から初めて,次第に成長(C4.5と同じ)

全データの到着を待たずに,適応的に木を生長させ る.

(40)

VFDT (vary fast Decision Tree

Learner) [Domingos, Hulten, KDD'00]

Shape = round?

Size= big?

Color= yellow

Size= small?

Taste = sweet?

Binana Apple

Grapefruit Lemon Cherry Grape

yes no

yes no yes no

yes no

yes no

Color=yellow & Shape=round &

Size=small & Taste=sour &

class=Lemon

Color=yellow & Shape=round &

Size=small & Taste=sour &

class=Lemon A training example Color=yellow & Shape=round &

Size=small & Taste=sour &

class=Lemon

Color=yellow & Shape=round &

Size=small & Taste=sour &

class=Lemon A training example

(41)

有村博紀,九州大学 情報知識ネットワーク特論

ストリーム志向クラスタリング

BIRCH [Zhang, Ramakrishnan, Livny, DMKD, 1997]

データを粗視化してクラスタリングを大規模化

B木に似た構造で,適応的にクラスタを成長・分割

プロトタイプを用いる

クラスタ化

クラスタ化 粗視化粗視化

データ

クラスタ

粗視化データ

(42)

アウトライン

ストリームデータ

近似カウンティング

Manku & Motwani (VLDB’02)

ストリームからのパターン発見

Hidber (SIGMOD’99)

浅井, 有村, 有川 (ICDM’02)

ストリームに対する近似統計手法

ストリーム統計のいろいろ(Alon, Matias, Szegedy, STOC’96

頻度モーメントの計算手法

まとめ

(43)

ストリームに対する近似統計手法

Probabilistic counting (Flajolet, Martin, FOCS’83)

The space complexity of approximating the frequency moments

Alon, Matias, Szegedy, STOC’96

Tracking Join and Self-Join Sizes in Limited Storages (Alon, Gibbons, Matias, Szegedy, PODS ’99)

Synopsis Data Structures for Massive Data Sets (Gibbons, Matias, SODA ‘99)

(44)

有村博紀,九州大学 情報知識ネットワーク特論

ストリームに対する統計

(telnet, 192.168.1.30, 192.168.0.20) (ftp, 192.168.1.30, 192.168.0.20) (smtp, 192.168.0.40, 192.168.1.30) (auth, 192.168.1.30, 192.168.0.40) (smtp, 192.168.0.40, 192.168.1.30) (shell, 192.168.1.30, 192.168.0.40) (sunrpc, 192.168.0.20, 192.168.1.30 (ftp-data, 192.168.0.20, 192.168.1.30) (ftp-data, 192.168.0.20, 192.168.1.30)

アイテムの種類

何種類のアイテムが出現しているか?

Skewness

アイテムの分布がどれくらい偏っているか?

最頻アイテム

与えられた頻度より多く出現している アイテムを見つけよ

ホットリスト

頻度が高い方から上位 K 個のアイテムを 知りたい

1 2 item n frequency

(45)

有村博紀,九州大学 情報知識ネットワーク特論

頻度モーメント (Frequency moment)

N = {1, 2, …, n}:

要素のドメイン

A = (a

1

, a

2

, …, a

m

):

データストリーム

m

i

:

ストリーム中の要素

i

の出現数

頻度モーメント

F

k

:

k n i

i

k n k

n i

k i k

m F

m m

m F

) (

max

) (

...

) (

) (

1

1 1

 

1 2 item n frequency

(46)

頻度モーメント (Frequency moment)

F0 : 異なるアイテムの種類

F1 : たんなるデータの総数(カウンタ)

F2 : 片より度/Gini指数(頻度の分散)

Estimated Size of Self-Join

Skew Handling in Parallel Join DeWitt et al. VLDB’92)

Query Result Size Estimation (Ioannidis & Poosala SIGMOD’95)

F: 頻度の最大値(最頻アイテム)

ヒストグラム:どの統計量も,

O(n)

個の

出現数カウンタをもてば簡単に計算可

!

たった1個の出現数カウンタ だけで 計算できないか?

1 2 item n frequency

(47)

有村博紀,九州大学 情報知識ネットワーク特論

ランダム射影を用いた F 2 の計算

(Alon, Matias, Szegedy, STOC’96)

ランダム射影(Random Projection)

同じアイテム同士は同じ符号に,違うアイテム同士は 高い確率で違う符号をわりあてるハッシュ関数

h : N  { +1, 1}

条件0: アイテム x に対して正負の符号をわりあてる.

条件1: h(x) の期待値は 0

条件2: 異なるアイテム x, y に対して,対 h(x) h(y) は独立

条件3: h は4独立.つまり,4つの異なるアイテム x, y, z, w に対して,h(x), h(y), h(z), h(w) が独立.

上の条件をみたすハッシュ関数は

O(1) (int) = O(log n) (bits)で実現可能

(48)

ランダム射影を用いた F 2 の計算

(Alon, Matias, Szegedy, STOC’96)

アルゴリズム

データストリーム A = (a1, a2, …, am) に対して,

次のアイテム

a

i を受け取って,値 h(ai){+1, 1}

を変数 Z に足し込む.

F2 の推定値として Z2 を返す

結果

上のアルゴリズムは高い確率でF2 を推定

対の独立性で平均の一致を保障し,4つ組の独立性で分散(誤 差)の小ささを保障する

(49)

有村博紀,九州大学 情報知識ネットワーク特論

) (aj h

なぜこれで F 2 が計算できるか?

m j i

j i

m

h a h a

a h a

h Z

, 1 2

1

2

( ( ) ... ( )) ( ) ( )

) (a1

h h(a2) h(am) )

(a1 h

) (a2 h

) (am h

) (ai h

Z

2 は,全アイテ ムの組の符号の 積和に等しい

) (

)

( a

i

h a

j

h ( a

i

)  h ( a

j

) h

0 )

( )

(

1

 

i j m

j

i

h a

a

h

(50)

) (aj ) h

(a1

h h(a2)

なぜこれで F 2 が計算できるか?

1

1

1

1

1

1

1

1

1

) (am h

) (a1 h

) (a2 h

) (am h

) (ai h

値が等しいとき

)

2

( m

i

2 ,

, 1

) (

) (

)

(

a

a a a m j i

j

i

h a m

a h E

j i

 

 

 

  

2 ,

, 1

) (

) (

)

(

a

a a a m j i

j

i

h a m

a h E

j i

 

 

 

  

2つの同じアイテム に対しては,積は つねに+1

.

積和の期待値は(ma)2

(51)

有村博紀,九州大学 情報知識ネットワーク特論

) (aj ) h

(ai h

なぜこれで F 2 が計算できるか?

m j i

j i

m

h a h a

a h a

h Z

, 1 2

1

2

( ( ) ... ( )) ( ) ( )

1 +1

1 +1 +1

1

1

1 +1

1 +1

1 +1

1 +1

1

1 +1 1

+1

1 +1 )

(a1

h h(am)

) (a1 h

) (am h

) (ai h

独立性から,2つの 異なるアイテムに 対しては,次の4つ が等確率で生起

(+1,

-1)

(

-1

,

+1)

(+1,

+1)

(

-

1,

-1)

積和の期待値は 0 h(aj )

0 )

( )

(

, 1

 

 

 

  

i j m ai aj

j

i

h a

a h

E ( ) ( ) 0

, 1

 

 

 

  

i j m ai aj

j

i

h a

a

h

E

(52)

なぜこれで F 2 が計算できるか?

 

2 1

, ,

1

, 1

, ,

1 , 1

2 1

2

0

) (

) (

) (

) (

)) (

) ( (

) ) ( (

F m

a h a

h E

a h a

h E

a h a

h E

a h E

Z E

n a

a

a a m j i

j i

a a a n a m j i

j i

m j i

j i

m i

i

j i

j i

 

 

 

 

 

 

 

 

 

 

 

 

) (aj ) h

(ai h

1 +1 +1

1 +1 +1

1 +1

1 +1

1 +1

+1 +1

1 +1

1 +1

1 +1

1 +1

+1 +1

1 +1 1

+1 +1

+1

+1

1 +1 +1

+1 +1

) (a1

h h(am)

) (a1 h

) (am h

) (ai h

) (aj h

(53)

有村博紀,九州大学 情報知識ネットワーク特論

頻度モーメント (Frequency moment)

F0 : 異なるアイテムの種類

確率的近似 O(log n) (bit) = O(1) (int)

F1 : たんなるデータの総数(カウンタ)

確率的近似 O(loglog n) (bit)

F2 : 片より度/Gini指数(頻度の分散)

確率的 O(log n) (bit) = O(1) (int)

F

2 は,たった1個の出現数カウンタ だけで計算できる!

1 2 item n frequency

(54)

アウトライン

ストリームデータ

近似カウンティング

Manku & Motwani (VLDB’02)

ストリームからのパターン発見

Hidber (SIGMOD’99)

浅井, 有村, 有川 (ICDM’02)

ストリームに対する近似統計手法

ストリーム統計のいろいろ(Alon, Matias, Szegedy, STOC’96

頻度モーメントの計算手法

まとめ

(55)

有村博紀,九州大学 情報知識ネットワーク特論

まとめ

ストリームデータ

ストリームに対する近似統 計手法

ストリーム統計のいろいろ

頻度モーメントの計算手法

近似カウンティング

Manku & Motwani (VLDB’02)

ストリームからのアイテム 集合発見

半構造データストリーム

浅井, 有村, 有川 (ICDM’02)

ストリームデータ

高速なデータストリームから,

時間変化しながら,連続して供 給される,大量のデータ

ストリームアルゴリズム

膨大で高速なデータストリーム

限定された計算資源を用いて 働き続ける

近似的な解でよい

(56)

ストリームデータ処理

データストリーム

..

プロセッサ

ドメイン = {1,,U}

アイテム

膨大で高速なデータストリームから,

時間とともに変化するパターンや規則を発 見・抽出し,(マイニングの仕事のとき)

限定された計算資源を用いて働き続ける

ただし,近似的な解でよい

概要データ ヒント

(57)

有村博紀,九州大学 情報知識ネットワーク特論

関連研究 : SIGKDD 2003 他から

Association Rules: (Chang & Lee, SIGKDD’03)

Finding recent frequent itemsets adaptively over online data streams

Decision Trees: (Wang, Fan, P. S. Yu, J. Han, SIGKDD’03)

Mining concept-drifting data streams using ensemble classifiers

Multiple streams: (Zhu & Shasha, SIGKDD’03)

Efficient elastic burst detection in data streams

Multiple streams: (Babcock & C. Olston, SIGMOD’03)

Distributed Top-K Monitoring

Multiple streams: (Guha, Gunopulos, Koudas, SIGKDD’03)

Correlating synchronous and asynchronous data streams

IDS: (Yamanishi, Takeuchi, Williams, SIGKDD’02)

Online Unsupervised outlier detection using finite mixtures with discounting learning algorithms

IDS: (W. Lee & S. J. Stolfo, Usenix, Security, 1998)

Data Mining Approaches for Intrusion Detection

(58)

今日の内容

6

:

ストリームマイニング

ストリームマイニングとは

ストリームに対する近似統計手法

近似カウンティング

ストリームからのアイテム集合発見

半構造データストリーム ポイント

超低メモリアルゴリズム

(59)

有村博紀,九州大学 情報知識ネットワーク特論

参照

関連したドキュメント

REC DATA MASTER L to SD CARD REC DATA MASTER R to SD CARD VOLUME SOUND

In this paper, the method is applied into quantized feedback control systems and the performance of quantizers with subtractive dither is analyzed.. One of the analyzed quantizer

These results can be used to assess the difference between two chronologically or physically separated massive data sets, making one quick pass over each data set, without buffering

By Robin Forman’s discrete Morse theory, the number of evasive faces of a given di- mension i with respect to a decision tree on a simplicial complex is greater than or equal to the

According to our new conception object-oriented methodology is based on the elimination of decision repetitions, that is, sorting the decisions to class hierarchy, so that the

Indeed, like in the classical case the estimation of the decay rate can be reduced to the problem of estimating of the restriction of Fourier transforms to non-degenerate

The calibration problem for the Black-Scholes model was solved based on the S&amp;P500 data, and the S&amp;P 500 call and put option price data were interpreted in the framework

We will call scattering data some special initial data which imply the exis- tence of the Ω-SRF as a formal gradient flow for the restriction of Perelman’s W -functional over