[Networkit] run networkit and see the modularity(quality of found communities) and timing result

Elisabetta Bergamini elisabetta.bergamini at kit.edu
Wed Aug 31 11:55:31 CEST 2016


Hello Maria,

> Hello
> i ran the networkit according to get started section in the site as Building Only the C++ Core, now it does work, but i have two question to ask
> 1) as you know the default dataset is "jazz.graph"(it did work properly) but when i changed it to this dataset"wiki-vote.txt" (that there is in the input folder) i faced with this error in the linux terminal:
>  
> [simple demonstration of NetworKit as a library
> terminate called after throwing an instance of 'std::invalid_argument'
>   what():  string contains no digits
> Aborted (core dumped)]
> Is admissible file format to run on the code only ".graph" or ".txt" suffix is accepted?

Which reader did you use for wiki-vote.txt? jazz.graph (and all the flies ending in “.graph” in the networkit input folder) are stored in the METIS format [1], whereas wiki-vote.txt is stored as an edge list. 
Therefore, for wiki-vote you should use EdgeListReader instead of METISGraphReader.

>  
> 2) why when i run the code(for example for "jazz.graph"), the execution time(total time) and quality(modularity) will not be displayed, in the other word, how i must run the code(LibDemo.cpp) to see this result(time and modularity value) also?
>  

You should edit the file LibDemo.cpp (in the NetworKit folder). To display modularity, you need the Modularity class, which can be used as follows:

 	double modularity = NetworKit::Modularity().getQuality(communities, jazz); 
 	std::cout<<"Modularity of the partition: "<<modularity<<"\n”;

To measure the execution time, you can use the NetworKit Timer class.

I hope this answers your question. If not, or if you need further help for other issues, please write to the NetworKit mailing list (in CC), so that also other people can help you and benefit from the discussion. 
Best,

Elisabetta

[1] http://people.sc.fsu.edu/~jburkardt/data/metis_graph/metis_graph.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ira.uni-karlsruhe.de/pipermail/networkit/attachments/20160831/47925acd/attachment.html>


More information about the NetworKit mailing list