SlideShare uma empresa Scribd logo
1 de 25
Baixar para ler offline
Community Detection
-  Girvan Newman Algorithm
-  Newman Algorithm
Community Detectionって?
あるネットワークの中で、	
  
密にリンクされたノードの集まりを見つける。	
  

コミュニティ間は疎

コミュニティ内は密
何の役に立つ?
似た特徴を持つノード同士が密にリンクされる傾向	
  
(Assorta)ve	
  Mixing)を持つネットワークにおいて	
  

Social Networks

WWW

Route

各ノードの特徴情報を用いずに、	
  
ネットワーク構造から似たノードのグループを発見できる。	
  
2つの階層クラスタリングアルゴリズム
Girvan-Newman Algorithm
Newman,	
  M.E.J.,	
  Girvan,	
  M.,	
  2004.	
  Finding	
  and	
  evalua)ng	
  community	
  structure	
  in	
  networks.	
  	
  
Physical	
  Review	
  E,	
  69(2),	
  026113.	
  	
  

Newman Algorithm
Newman,	
  M.E.J.,	
  2004.	
  Fast	
  algorithm	
  for	
  detec)ng	
  community	
  structure	
  in	
  networks.	
  
Physical	
  Review	
  E,	
  69(6),	
  066133.	
  	
  
2つの階層クラスタリングアルゴリズム
Girvan-Newman Algorithm

Newman Algorithm
2つの階層クラスタリングアルゴリズム
Girvan-Newman Algorithm

Newman Algorithm
Girvan-Newman Algorithm
Girvan-Newman Algorithm
グラフの中で、最も「コミュニティ間をつないでいる」可能性の高いエッジを見つけ、	
  
そのエッジを除去する。	
  
コミュニティ間をつなぐエッジ、どう見つける?
Shortest-­‐path	
  betweenness	
  
同一コミュニティ内の二点間の最短経路はほとんど重複しないはず。	
  

別々のコミュニティに属する二点間の最短経路の	
  
多くが同じエッジを通過するはず。	
  
デンドログラム
出力はコミュニティ分割の入れ子構造を表すデンドログラム。	
  

ネットワーク	
  

デンドログラム	
  
デンドログラム

どのコミュニティ構造が最適かを計る指標が必要。	
  
Modularity Q
N

Q = ∑ (eii − a )
2
i

i=1

N

(-­‐1/2<=Q<=1)	
  

: コミュニティ数	
  

eii : 総エッジ数に対する	
  

  両端がコミュニティ i	
  に含まれるエッジの割合	
  

ai : 総エッジ数に対する	
  

  少なくとも片端がコミュニティ i	
  に含まれるエッジの割合	
  
Modularity Qの意味
N

Q = ∑ (eii − a )
2
i

i=1
-­‐  「コミュニティ内のエッジ数が多い」だけでは不十分。	
  
-­‐  それだと全ノードが同じコミュニティに属している場合が最大。	
  
-­‐  ランダムグラフにおけるコミュニティ内エッジ数の期待値と比較。	
  
Modularity Qの意味
同じコミュニティに属するノードv,	
  ノードwの組み合わせについて	
  

1
=
∑(Avw − Pvw )δ (Cv, Cw )
2m vw
vw間にエッジが張られていれば1,	
  	
  
無ければ0	
  

同じ度数のランダムグラフで	
  
vw間にエッジが張られる確率	
  
Modularity Qが最大になる構造を採用する。

(Newman	
  and	
  Girvan,	
  2004)	
  

Community	
  数	
  
Girvan-Newman Algorithmの欠点
計算量が非常に大きい。	
  
-­‐  消去するエッジを見つけるための	
  
	
  betweennessの計算がO(mn)	
  
	
  
-­‐  全エッジを消去するためm回繰り返すので	
  
	
  合計O((m^2)n)	
  
Newman Algorithm
Newman Algorithm
Betweennessの計算はコストが高い。	
  
モジュラリティ値を上げる事が目的なら、一々betweennessの計算をせずに	
  
最初からモジュラリティについての最大化問題と捉えたらどうか。	
  
コミュニティ併合時のモジュラリティ上昇量に着目	
  

ΔQ	
  

モジュラリティQ=0	
  

モジュラリティQ=0+ΔQ	
  
コミュニティ合併時のモジュラリティ上昇量に着目

合併時のモジュラリティ上昇が大きい	
  

合併してもモジュラリティ上昇は少ない	
  

ΔQij = Qnew − (Qi + Q j ) = eij + e ji − 2ai a j = 2(eij + ai a j )
Newman Algorithm
Newman Algorithmの計算量
	
  
-­‐  コミュニティの併合とΔQの再計算にO(m+n)	
  
-­‐  全ノードが一つのコミュニティになるまで繰り返す	
  
	
  ので、全体としてO((m+n)n)	
  
-­‐	
   後にデータ構造を工夫したCNMアルゴリズムに
	
  よってO(n	
  log^2n)まで小さくなった。	
  
	
  
Girvan Newman VS Newman

精度はほとんど同じか、Girvan-­‐Newmanの方が少し良い程度。	
  
Girvan Newman VS Newman   (Pythonで実装)
まとめ
Girvan-­‐Newman	
  Algorithm	
  
-­‐  トップダウンでコミュニティを分割していく	
  
-­‐  Shortest-­‐path	
  betweennessに基づいてエッジを消去	
  
-­‐  O((m^2)n)	
  
Newman	
  Algorithm	
  
-­‐  ボトムアップでコミュニティを併合していく	
  
-­‐  モジュラリティの最大化が目的	
  
-­‐  コミュニティ併合時のモジュラリティ上昇に着目	
  
-­‐  O((m+n)n)	
  
References
-­‐	
  Girvan-­‐Newman	
  Algorithm	
  
Newman,	
  M.E.J.,	
  Girvan,	
  M.,	
  2004.	
  Finding	
  and	
  evalua)ng	
  community	
  structure	
  in	
  networks.	
  	
  
Physical	
  Review	
  E,	
  69(2),	
  026113.	
  	
  
(hZp://arxiv.org/abs/cond-­‐mat/0308217)	
  

-­‐	
  Newman	
  Algorithm	
  
Newman,	
  M.E.J.,	
  2004.	
  Fast	
  algorithm	
  for	
  detec)ng	
  community	
  structure	
  in	
  networks.	
  	
  
Physical	
  Review	
  E,	
  69(6),	
  066133.	
  
(hZp://arxiv.org/abs/cond-­‐mat/0309508)	
  	
  

-­‐	
  CNM	
  Algorithm	
  
Clauset,	
  A.,	
  Newman,	
  M.E.J.,	
  Moore,	
  C.,	
  2004.	
  Finding	
  community	
  structure	
  in	
  very	
  large	
  networks.	
  	
  
Physical	
  Review	
  E,	
  70(6),	
  066111.	
  	
  
(hZp://arxiv.org/abs/condmat/0408187)	
  

-­‐	
  各種コミュニティ発見アルゴリズムの比較	
  
Lancichine`,	
  A.,	
  Fortunato,	
  S.,	
  2009.	
  Community	
  detec)on	
  algorithms:	
  a	
  compara)ve	
  analysis.	
  	
  
Physical	
  Review	
  E,	
  80(5),	
  056117.	
  
(hZp://arxiv.org/abs/0908.1062)	
  	
  

Mais conteúdo relacionado

Mais procurados

RによるBox-Cox変換
RによるBox-Cox変換RによるBox-Cox変換
RによるBox-Cox変換
wada, kazumi
 
Uplift Modelling 入門(1)
Uplift Modelling 入門(1)Uplift Modelling 入門(1)
Uplift Modelling 入門(1)
Yohei Sato
 
المحاضرة الرابعة - التعلم المدمج
المحاضرة الرابعة - التعلم المدمجالمحاضرة الرابعة - التعلم المدمج
المحاضرة الرابعة - التعلم المدمج
التعلم المدمج
 
ナイーブベイズによる言語判定
ナイーブベイズによる言語判定ナイーブベイズによる言語判定
ナイーブベイズによる言語判定
Shuyo Nakatani
 

Mais procurados (20)

RによるBox-Cox変換
RによるBox-Cox変換RによるBox-Cox変換
RによるBox-Cox変換
 
Uplift Modelling 入門(1)
Uplift Modelling 入門(1)Uplift Modelling 入門(1)
Uplift Modelling 入門(1)
 
2部グラフとソーシャルネットワーク
2部グラフとソーシャルネットワーク2部グラフとソーシャルネットワーク
2部グラフとソーシャルネットワーク
 
AWS Academyの登録手順と利用手順
AWS Academyの登録手順と利用手順AWS Academyの登録手順と利用手順
AWS Academyの登録手順と利用手順
 
「解説資料」ViTPose: Simple Vision Transformer Baselines for Human Pose Estimation
「解説資料」ViTPose: Simple Vision Transformer Baselines for Human Pose Estimation 「解説資料」ViTPose: Simple Vision Transformer Baselines for Human Pose Estimation
「解説資料」ViTPose: Simple Vision Transformer Baselines for Human Pose Estimation
 
学習時に使ってはいないデータの混入「リーケージを避ける」
学習時に使ってはいないデータの混入「リーケージを避ける」学習時に使ってはいないデータの混入「リーケージを避ける」
学習時に使ってはいないデータの混入「リーケージを避ける」
 
المحاضرة الرابعة - التعلم المدمج
المحاضرة الرابعة - التعلم المدمجالمحاضرة الرابعة - التعلم المدمج
المحاضرة الرابعة - التعلم المدمج
 
大規模言語モデル開発を支える分散学習技術 - 東京工業大学横田理央研究室の藤井一喜さん
大規模言語モデル開発を支える分散学習技術 - 東京工業大学横田理央研究室の藤井一喜さん大規模言語モデル開発を支える分散学習技術 - 東京工業大学横田理央研究室の藤井一喜さん
大規模言語モデル開発を支える分散学習技術 - 東京工業大学横田理央研究室の藤井一喜さん
 
[DL輪読会]DropBlock: A regularization method for convolutional networks
[DL輪読会]DropBlock: A regularization method for convolutional networks[DL輪読会]DropBlock: A regularization method for convolutional networks
[DL輪読会]DropBlock: A regularization method for convolutional networks
 
ナイーブベイズによる言語判定
ナイーブベイズによる言語判定ナイーブベイズによる言語判定
ナイーブベイズによる言語判定
 
OWLで何が書けるか
OWLで何が書けるかOWLで何が書けるか
OWLで何が書けるか
 
2022年度調和系工学研究室配属説明会資料
2022年度調和系工学研究室配属説明会資料2022年度調和系工学研究室配属説明会資料
2022年度調和系工学研究室配属説明会資料
 
Random Forestsとその応用
Random Forestsとその応用Random Forestsとその応用
Random Forestsとその応用
 
PR-190: A Baseline For Detecting Misclassified and Out-of-Distribution Examp...
PR-190: A Baseline For Detecting Misclassified and Out-of-Distribution  Examp...PR-190: A Baseline For Detecting Misclassified and Out-of-Distribution  Examp...
PR-190: A Baseline For Detecting Misclassified and Out-of-Distribution Examp...
 
データサイエンス概論第一=8 パターン認識と深層学習
データサイエンス概論第一=8 パターン認識と深層学習データサイエンス概論第一=8 パターン認識と深層学習
データサイエンス概論第一=8 パターン認識と深層学習
 
المحاضرة الثالثة - منظومة المنهج
المحاضرة الثالثة - منظومة المنهجالمحاضرة الثالثة - منظومة المنهج
المحاضرة الثالثة - منظومة المنهج
 
[DL輪読会](Sequential) Variational Autoencoders for Collaborative Filtering
[DL輪読会](Sequential) Variational Autoencoders for Collaborative Filtering[DL輪読会](Sequential) Variational Autoencoders for Collaborative Filtering
[DL輪読会](Sequential) Variational Autoencoders for Collaborative Filtering
 
تصميم التعليم الإلكتروني
تصميم التعليم الإلكترونيتصميم التعليم الإلكتروني
تصميم التعليم الإلكتروني
 
[DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017...
[DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017...[DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017...
[DL輪読会] “Asymmetric Tri-training for Unsupervised Domain Adaptation (ICML2017...
 
Automatic Mixed Precision の紹介
Automatic Mixed Precision の紹介Automatic Mixed Precision の紹介
Automatic Mixed Precision の紹介
 

Destaque (6)

R seminar on igraph
R seminar on igraphR seminar on igraph
R seminar on igraph
 
Datamining 8th Hclustering
Datamining 8th HclusteringDatamining 8th Hclustering
Datamining 8th Hclustering
 
Advanced Methods in Network Science: Community Detection Algorithms
Advanced Methods in Network Science: Community Detection Algorithms Advanced Methods in Network Science: Community Detection Algorithms
Advanced Methods in Network Science: Community Detection Algorithms
 
Community detection in social networks
Community detection in social networksCommunity detection in social networks
Community detection in social networks
 
Communities and dynamics in social networks
Communities and dynamics in social networksCommunities and dynamics in social networks
Communities and dynamics in social networks
 
Roles In Networks
Roles In NetworksRoles In Networks
Roles In Networks
 

Último

Último (11)

新人研修 後半 2024/04/26の勉強会で発表されたものです。
新人研修 後半        2024/04/26の勉強会で発表されたものです。新人研修 後半        2024/04/26の勉強会で発表されたものです。
新人研修 後半 2024/04/26の勉強会で発表されたものです。
 
Observabilityは従来型の監視と何が違うのか(キンドリルジャパン社内勉強会:2022年10月27日発表)
Observabilityは従来型の監視と何が違うのか(キンドリルジャパン社内勉強会:2022年10月27日発表)Observabilityは従来型の監視と何が違うのか(キンドリルジャパン社内勉強会:2022年10月27日発表)
Observabilityは従来型の監視と何が違うのか(キンドリルジャパン社内勉強会:2022年10月27日発表)
 
Utilizing Ballerina for Cloud Native Integrations
Utilizing Ballerina for Cloud Native IntegrationsUtilizing Ballerina for Cloud Native Integrations
Utilizing Ballerina for Cloud Native Integrations
 
LoRaWANスマート距離検出センサー DS20L カタログ LiDARデバイス
LoRaWANスマート距離検出センサー  DS20L  カタログ  LiDARデバイスLoRaWANスマート距離検出センサー  DS20L  カタログ  LiDARデバイス
LoRaWANスマート距離検出センサー DS20L カタログ LiDARデバイス
 
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
 
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアルLoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
 
知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx
知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx
知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx
 
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
 
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
 
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
 
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
 

Community detection