[Networkit] Problem with profiling tree network

Felix Muench felix.muench at qut.edu.au
Wed Dec 28 15:51:55 CET 2016


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?
-------------- n�chster Teil --------------
Ein Dateianhang mit HTML-Daten wurde abgetrennt...
URL: <http://lists.ira.uni-karlsruhe.de/pipermail/networkit/attachments/20161228/2e3726fd/attachment.html>


More information about the NetworKit mailing list