GMatch4py accuracy for graph edit distance
Created by: ffaez
Hi, I have a simple code to compare the computed graph edit distance with GMatch4py and also the graph_edit_distance function in networkx. my code is as follows:
g1=nx.complete_graph(3)
g2=nx.complete_graph(4)
ged=gm.GraphEditDistance(1,1,1,1) # all edit costs are equal to 1
result=ged.compare([g1,g2],None)
print("GMatch4py output:\n", result)
print("networkx output:\n", nx.graph_edit_distance(g1,g2))
and the results are:
GMatch4py output:
[[0. 7.]
[7. 0.]]
networkx output:
4.0
Would you please tell me what does each element of the output matrix of GMatch4py mean? Is 7 the edit distance computed by GMatch4py while the exact edit distance is 4? Is the performance and accuracy of GMatchpy low even for very small graphs or it is just an understanding mistake made by me? Regards