Sure, sorry for that:

-------------

g = gt.price_network(10000,10,directed=False)
%time gt.eigenvector(g)

def node_sample(g, g_vertices, n_samples):
    return random.sample(g_vertices, n_samples)
sample = node_sample(g, [x for x in g.vertices()], 1000)

vfilt = g.new_vertex_property('bool')
for s in sample:
    vfilt[s] = True
g_sample = gt.GraphView(g, vfilt=vfilt)

%time gt.eigenvector(g_sample)

-------------

This is run in an ipython environment.

Cheers,
Philipp


On 27.07.2016 17:01, Alexandre Hannud Abdo wrote:
HI Philipp,

Can you provide minimal sample code that demonstrates your observations?

That usually improves tenfold the chance that anyone will be able to help.

Cheers,
ale

On Wed, Jul 27, 2016 at 3:14 PM, Philipp Singer <[email protected] <mailto:[email protected]>> wrote:

    Hi all,

    I have run into a runtime/complexity question where I am wondering
    if someone can give me insights into why this might happen.

    I have conducted the following steps:

    1.) Create some random network
    2.) Calculate eigenvector centrality
    3.) Sample 10% random nodes
    4.) Filter graph by nodes
    5.) Calculate eigenvector centrality on sample

    I have observed that for the sample, the eigenvector centrality
    calculation takes much longer, in some cases (dependent e.g., on
    block structure) it takes way longer (like 30 times longer).

    I am now trying to figure out why this is the case. I assume it
    has something to do with the convergence which might be probably
    because links are missing in the sample. If I do the same for
    e.g., PageRank the difference is not that drastic (it still takes
    longer in the sample).

    Does anyone have an idea what is going on here?

    Thanks,
    Philipp
    _______________________________________________
    graph-tool mailing list
    [email protected] <mailto:[email protected]>
    https://lists.skewed.de/mailman/listinfo/graph-tool




_______________________________________________
graph-tool mailing list
[email protected]
https://lists.skewed.de/mailman/listinfo/graph-tool

_______________________________________________
graph-tool mailing list
[email protected]
https://lists.skewed.de/mailman/listinfo/graph-tool

Reply via email to