This project aims to merge the results of different community detection algorithms for undirected ,weighted graphs and come up with a (hopefully) better results.
Python 2.7 must be installed and the following python libraries must be installed for the project to run.
The algorithm has been tested on the DBLP dataset from SNAP. The graph was partitioned using the following algorithms and the corresponding files were generated.
Algorithm | file generated |
---|---|
Infomap | input1.txt |
Louvain | input2.txt |
Markov Clustering | input3.txt |
OSLOM | input4.txt |
WalkTrap | input5.txt |
All these files (including the original DBLP dataset) are available in dataset/ directory
Download/clone this repository and then, cd to the project directory and type :
$ make run
This prints the fscore of our merged community detection algorithm.
Apart from that , it also generates the following output files
- weighted_graph.out : The 'merged' weighted graph formed from input1.txt .. input5.txt
- pruned_weighted_graph.out : The above graph has been pruned by removing edges with 0 weights
- node_community.out : gives the nodenumber and the corresponding community to which it belongs on each line
- community_node_list.out : Gives the community wise list of nodes. A new line starts a new community
- fscorecomp.out : the fscore of our algorithm
- Graph.gml : The pruned weighted graph stored in gml ( graph markup language ) format. The primary purpose of generating this file is to be able to visualize using the software Gephi.
These output and binary files may be removed from the project directory by using :
$ make clean
Since running the entire project and generating the output files may take some time ( ~ 30 minutes) , the output files generated on a single run have been included in the Outputfiles/ directory.
The Graph.gml file can be directly opened using Gephi and visualized.