23
Twitterにおける自動リスト作成 @mosa_siru 121129日木曜日

how to make twitter list automatically

Embed Size (px)

DESCRIPTION

how to make twitter list automatically

Citation preview

Page 1: how to make twitter list automatically

Twitterにおける自動リスト作成@mosa_siru

12年11月29日木曜日

Page 2: how to make twitter list automatically

目標• Clusteringの手法を使って、Twitterにおけるリスト作成を自動化

• リスト:友人の中で特に見たい人をグループにして閲覧する機能

• 「サークルの友人リスト」などを自動的に作成したい

• 各リスト(以下module)はオーバーラップ

• 例:大学の友人,サークルの友人の両方に属する人が存在

12年11月29日木曜日

Page 3: how to make twitter list automatically

ソーシャルグラフとしてのTwitter

•ユーザーをNode、フォロー関係をEdgeとして有向グラフで表す

•自己ループやMultiple Edgeは存在しないが、Double Edge(↔)は存在する

12年11月29日木曜日

Page 4: how to make twitter list automatically

手法

• Clique Percolation Method (CPM)• Gergely Palla, Imre Derenyi, Illes Farkas, and Tam´as

Vicsek (2005) Nature 435,814

• k-clique(完全グラフ)を繋げたものを1つのmodule(k-cliques)とする

12年11月29日木曜日

Page 5: how to make twitter list automatically

CPM以下k=4とする

12年11月29日木曜日

Page 6: how to make twitter list automatically

CPM(1)k-cliqueを見つける

12年11月29日木曜日

Page 7: how to make twitter list automatically

CPM(2)k-1個のnodeを共有した、k-cliqueを見つける

12年11月29日木曜日

Page 8: how to make twitter list automatically

CPM(3)これを繰り返し、探索が終わり訪れたnodeを

1moduleとする

12年11月29日木曜日

Page 9: how to make twitter list automatically

CPM(4)複数のmoduleを作ると、重複する

12年11月29日木曜日

Page 10: how to make twitter list automatically

CPMの特徴

• 条件の厳しさや各moduleの大きさを、kを変化させることで調整できる

• 他の手法と違い、local情報のみ必要

• global情報を取れない今回のデータにマッチ

• あるmoduleに他のmoduleが影響することはない

12年11月29日木曜日

Page 11: how to make twitter list automatically

CPMkを小さくすると、条件が緩くなりmoduleが

大きくなる。(例:k=3)

12年11月29日木曜日

Page 12: how to make twitter list automatically

CPMd

• 有向グラフのCPM

• Gergely Palla, Illés J Farkas, Péter Pollner, Imre Derényi and Tamás Vicsek (2007) Physica A 387, 4959

• k-cliqueの定義を「 ループが存在しないようなk-clique」とした上でのCPM

12年11月29日木曜日

Page 13: how to make twitter list automatically

k-clique (CPMd)

4-cliqueであるループがない

4-cliqueでないループがある

12年11月29日木曜日

Page 14: how to make twitter list automatically

データ

• フォロー関係をTwitter APIで取得

• 使い方は記事にまとめた http://goo.gl/uHJX2

• 1時間に350Requestしか送れない!

• つまり350nodesのedge情報しか取れない

12年11月29日木曜日

Page 15: how to make twitter list automatically

現状• 自分@mosa_siruから2歩分のEdgeと1歩分のユーザー情報を取得

• 802nodes, 510000edges

• このデータではCPMdが終わらなかった

• 非常に密で、kを大きくしないと有意なmodule分類が得られないが、大きなk-clique同定は計算量が大きいため?

• ↔のみを抜き出した無向グラフでのCPMは計算できた

12年11月29日木曜日

Page 16: how to make twitter list automatically

元の有向グラフ(非常に密)12年11月29日木曜日

Page 17: how to make twitter list automatically

↔のみを抜き出した無向グラフ

12年11月29日木曜日

Page 18: how to make twitter list automatically

競技プログラミング

サークル

ネット友人1

計数中高

ネット友人2

CPM結果(k=9にて7modules)

12年11月29日木曜日

Page 19: how to make twitter list automatically

展望• API制限のため、逐次的にデータを取りたい

• 初期ノード集合を与え、それらが属する1つのmoduleを返す実装を考える

• 例:サークルの友人3人から、サークル集合のリストを返す

• 不要な枝情報を得ないことでAPI制限を回避

• 一応データが貰えないかTwitter社に打診中(返信待ち)

12年11月29日木曜日

Page 20: how to make twitter list automatically

例k=4とする

初期ノードを3つ指定する

me

12年11月29日木曜日

Page 21: how to make twitter list automatically

初期ノードからAPIより枝情報を取得する

me

12年11月29日木曜日

Page 22: how to make twitter list automatically

k-cliqueを1つ選ぶ

me

12年11月29日木曜日

Page 23: how to make twitter list automatically

me

隣接したk-cliqueを探すmoduleの新ノードの枝情報を取得し、新

たなk-cliqueを探す以下繰り返し

次はこのノードから枝情報を取得する

12年11月29日木曜日