This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# Girvan Newman algorithmを使って空手クラブネットワークのコミュニティが分割していく様子を出力 | |
# Zachary's karate club(空手クラブのネットワーク)のデータ取得元URL | |
# http://www-personal.umich.edu/~mejn/netdata/ | |
import networkx as NX | |
import networkx.readwrite.gml as NRG | |
import networkx.algorithms.centrality as NC | |
import pylab as P |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# オープンソースで学ぶ社会ネットワーク分析 | |
# 第6章 バイラルへ!- 情報の拡散 | |
# 拡散モデルのエージェントのネットワーク(図6-5) | |
import networkx as net | |
import matplotlib.pyplot as plot | |
import matplotlib.colors as colors | |
import random as r |