Skip to content

Commit

Permalink
Fixed README
Browse files Browse the repository at this point in the history
Fixed graph chart
  • Loading branch information
koteth committed Sep 17, 2014
1 parent 6ac7326 commit 73383ad
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
19 changes: 7 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This implementation is not yet optimized for large networks.
![example] (example.png)


## Installation
##Installation

python setup.py install

Expand All @@ -34,11 +34,13 @@ python setup.py install
-d, --draw-graph show graph with networkx (default: False)


The input matrix must be as comma separated value file representing the
The input matrix must be as comma-separated value file representing the
adjacency matrix.

An example is the file example.csv.
try mcl_clustering.py -e 3 example.csv
An example is the file example.csv in examples dir.

try:
mcl_clustering.py -d -e 3 <example_path>/example.csv


###Code
Expand Down Expand Up @@ -75,15 +77,8 @@ try mcl_clustering.py -e 3 example.csv
numpy
networkx

##Parameters

-i --inflate-factor
-e --expand-factor
-m --multiply-factor
-l --max-loops
-s --show-graph show graph with networkx

## References
##References

* [1] Stijn van Dongen, Graph Clustering by Flow Simulation.
PhD thesis, University of Utrecht, May 2000.
Expand Down
9 changes: 5 additions & 4 deletions mcl/mcl_clustering.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,15 @@ def draw(G, A, cluster_map):
colors.append(clust_map.get(i, 100))

pos = nx.spring_layout(G)
nx.draw_networkx_nodes(G, pos,node_size = 200, node_color =colors , cmap=plt.cm.Blues )
nx.draw_networkx_edges(G,pos, alpha=0.5)

from matplotlib.pylab import matshow, show, cm
matshow(A, fignum=100, cmap=cm.gray)
plt.figure(2)
nx.draw_networkx_nodes(G, pos,node_size = 200, node_color =colors , cmap=plt.cm.Blues )
nx.draw_networkx_edges(G,pos, alpha=0.5)
matshow(A, fignum=1, cmap=cm.gray)
plt.show()
show()

plt.show()

def stop(M, i):

Expand Down

0 comments on commit 73383ad

Please sign in to comment.