[Networkit] Problem with profiling tree network

Christian Staudt christian.staudt at kit.edu
Thu Dec 29 08:48:25 CET 2016


Hi Felix,
good to see you put the profiling functionality to use. It is pretty much a prototype, and the only way it will ever get really good is through improvement after user experience in practice. I wonder how easy it would be for you to make the adjustments you need. Since you are actually working with this you may be more qualified than anyone else right now. Of course the mailing list would be there to support you.

Best
Chris



> On 28 Dec 2016, at 15:51, Felix Muench <felix.muench at qut.edu.au> wrote:
> 
> Hi again,
> 
> so turning off closeness and clustering by creating a custom config solved the problem. Some hopefully helpful feedback: the documentation did not give much help on how to do so. A list of the measure options available via profiling.Config.setMeasure and profiling.Config.setProperty would have been handy.
> 
> Cheers,
> 
> Felix
> 
> On 28 December 2016 at 9:00:32 am, Felix Muench (felix.muench at qut.edu.au <mailto:felix.muench at qut.edu.au>) wrote:
> 
>> G’day,
>> 
>> I’ve got a contagion network, i.e. a combinations of a lot of tree structures, which I wanted to profile with networkit (4.2, on Ubuntu, in Jupyter notebook). But I get a division by zero error as soon as the profile preset is not 'minimal'. The network does not have any triads, as it is a tree. Is this the problem? If so, it should handle the exception gracefully and just skip the measures that rely on triads. If not, any ideas what’s my problem?
>> 
>> Thanks for the tool anyway!
>> 
>> # In[39]:
>> 
>> brexit_graph = readGraph("../data/adopted_10k.graphml", Format.GraphML)
>> 
>> 
>> # In[50]:
>> 
>> brexit_graph.removeSelfLoops()
>> brexit_graph_undirected = brexit_graph.toUndirected()
>> 
>> 
>> # In[56]:
>> 
>> profiling.Profile.setVerbose(True, level=0)
>> profiling.Profile.getVerbose()
>> 
>> 
>> # In[59]:
>> 
>> brexit_profile = profiling.Profile.create(brexit_graph_undirected, preset="complete")
>> 
>> # Out[59]:
>> Diameter: 0.02 s
>> 
>> EffectiveDiameter: EffectiveDiameter raised exception
>> Connected Components: 0.00 s
>> 
>> Centrality.Degree: 0.02 s
>>     Sort: 0.00 s
>>     Rank: 0.01 s
>>     Assortativity: 0.00 s
>>     Centralization: 0.00 s
>> Centrality.CoreDecomposition: 0.00 s
>>     Sort: 0.00 s
>>     Rank: 0.01 s
>>     Assortativity: 0.00 s
>>     Centralization: 0.00 s
>> Centrality.ClusteringCoefficient: 0.00 s
>>     Sort: 0.00 s
>>     Rank: 0.01 s
>>     Assortativity: 0.00 s
>>     Centralization: 0.00 s
>> Centrality.PageRank: 0.08 s
>>     Sort: 0.00 s
>>     Rank: 0.02 s
>>     Assortativity: 0.00 s
>>     Centralization: 0.00 s
>> Centrality.Katz: 0.01 s
>>     Sort: 0.00 s
>>     Rank: 0.01 s
>>     Assortativity: 0.00 s
>>     Centralization: Centrality.centralization not properly defined for Centrality.Katz. 0.00 s
>> Centrality.Betweenness: 0.01 s
>>     Sort: 0.00 s
>>     Rank: 0.01 s
>>     Assortativity: 0.00 s
>>     Centralization: Centrality.centralization not properly defined for Centrality.Betweenness. 0.00 s
>> Centrality.Closeness: 0.02 s
>>     Sort: 0.00 s
>>     Rank:
>> 
>> ---------------------------------------------------------------------------
>> ZeroDivisionError                         Traceback (most recent call last)
>> <ipython-input-59-41e4df014ebe> in <module>()
>> ----> 1 brexit_profile = profiling.Profile.create(brexit_graph_undirected, preset="complete")
>> 
>> /home/ubuntu/anaconda3/envs/brexit/lib/python3.5/site-packages/networkit/profiling/profiling.py in create(cls, G, preset, config)
>>     292                         timerAll = stopwatch.Timer()
>>     293                 result.__loadProperties()
>> --> 294                 result.__loadMeasures()
>>     295                 if cls.__verbose:
>>     296                         if cls.__verboseLevel < 1:
>> 
>> /home/ubuntu/anaconda3/envs/brexit/lib/python3.5/site-packages/networkit/profiling/profiling.py in __loadMeasures(self)
>>     816                         self.verbosePrint("    Rank: ", end="")
>>     817                         timerPostRank = stopwatch.Timer()
>> --> 818                         measure["data"]["ranked"] = stat.ranked(measure["data"]["sample"])
>>     819                         elapsedPostRank = timerPostRank.elapsed
>>     820                         self.verbosePrint("{:.2F} s".format(elapsedPostRank))
>> 
>> networkit/_NetworKit.pyx in _NetworKit.ranked (networkit/_NetworKit.cpp:77694)()
>> 
>> ZeroDivisionError: float division
>> 
>> 
>> Cheers,
>> 
>> Felix
>> 
>> P.S.: Is it too early to raise issues on GitHub, because I found it hard to find a way to do it on your Algohub?
>> 
> _______________________________________________
> NetworKit mailing list
> NetworKit at ira.uni-karlsruhe.de
> https://lists.ira.uni-karlsruhe.de/mailman/listinfo/networkit

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ira.uni-karlsruhe.de/pipermail/networkit/attachments/20161229/eb45d5a6/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.ira.uni-karlsruhe.de/pipermail/networkit/attachments/20161229/eb45d5a6/attachment.sig>


More information about the NetworKit mailing list