adityat / fastconsensus Goto Github PK
View Code? Open in Web Editor NEWFast consensus clustering in networks
License: BSD 3-Clause "New" or "Revised" License
Fast consensus clustering in networks
License: BSD 3-Clause "New" or "Revised" License
Hi. I want to be sure which algorithms are implemented. I have read the paper and it seems that they were all appropriate algorithms for non-directed networks. So just to confirm, some of the algorithms (cmn, lmp, infomap implemented here) is available for weighted directed networks and search for hierarchical communities?
Thanks in advance.
$ python3 fast_consensus.py -f examples/karate_club.txt --alg louvain
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/lib/python3.5/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/usr/lib/python3.5/multiprocessing/pool.py", line 44, in mapstar
return list(map(*args))
File "fast_consensus.py", line 97, in louvain_community_detection
return cm.partition_at_level(cm.generate_dendrogram(networkx_graph, randomize=True, weight='weight'), 0)
AttributeError: module 'networkx.algorithms.community' has no attribute 'partition_at_level'
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "fast_consensus.py", line 352, in <module>
output = fast_consensus(G, algorithm=args.alg, n_p=args.parts, thresh=args.tau, delta=args.delta, procs=args.procs)
File "fast_consensus.py", line 124, in fast_consensus
communities_all = pool.map(louvain_community_detection, get_yielded_graph(graph, n_p))
File "/usr/lib/python3.5/multiprocessing/pool.py", line 260, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "/usr/lib/python3.5/multiprocessing/pool.py", line 608, in get
raise self._value
AttributeError: module 'networkx.algorithms.community' has no attribute 'partition_at_level'
fast_consensus.py gives errors and does not run when the weights are added to the edgelist text file.
The clustering crashes for the edgelist file with ids starting from 1. For example, remove first 16 lines from the examples/karate_club.txt
and run the clustering.
Thanks for sharing your code!
Could you provide a software license, e.g. Apache 2.0, to this repository so that it's legal to reuse your code?
Why did you decide to delete all relevant code in this project?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.