I am running a script to calculate the likelihoods of certain edges being
missing edges on a filtered graph (I filter out some edges to see whether
the filtered edges are more likely to be missing than a bunch of other,
random edges that I also calculate the likelihood for).
When running this I however get an error telling me the following:
Traceback (most recent call last):
File "edge_prediction_stats_ex_+_rand_es.py", line 122, in <module>
line 155, in mcmc_equilibrate
extra = callback(state)
File "edge_prediction_stats_ex_+_rand_es.py", line 15, in
p = s.get_edges_prob([chosen_test_edges[i]],
line 345, in get_edges_prob
L += lstate.get_edges_prob(missing, spurious, entropy_args=eargs)
line 1147, in get_edges_prob
pos[u] = self.b[u]
line 446, in __getitem__
k = self.__key_convert(k)
line 424, in __key_convert
key = self.__g().vertex(key)
line 1760, in vertex
raise ValueError("Invalid vertex index: %d" % int(i))
ValueError: Invalid vertex index: 2
I have told python to return the vertex IDs of the edge that is raising the
error and have checked manually in the filtered graph whether these vertex
IDs are valid IDs and they are. Can anybody reproduce this error? Tiago, is
this in any way related to the errors I have been observing with filtered
graphs in the past?
I am running version 2.23dev (commit 87abb56d, Wed Apr 5 15:21:41 2017
+0100) which I think should be the latest version on Ubuntu 16.04 and have
compiled it with GCC 5.4.0.
Here is the network used ( graph_no_multi_clean.zip
) and here is the script used ( edge_prediction_stats_ex_+_rand_es.py
) to produce the error.