jacquesfize / GMatch4py

A graph matching library for Python
MIT License
192 stars 41 forks source link

Clearer documentation #18

Closed MohamedBarhdadi closed 3 years ago

MohamedBarhdadi commented 4 years ago

Considering that people in python often make use networkx to represent their graphs, the output of the compare() function may seem confusing to some people. The output for the networkx version of graph edit distance leads to single number like: 2.0. For gmatch4py this is a cost matrix like: [[1. 0. ] [0.17535545 1. ]] (normalized). I thought that it may be interesting to add in your documentation an explanation on how to interpret this cost matrix.

cheny124800 commented 4 years ago

I have the same confusion

MohamedBarhdadi commented 4 years ago

I have figured it out right now, you can view the cost-matrix as something like this fo the following example:

[ [0, 145], [230, 0] ]

->

G1, G2 [0 145] [230 0]

You can conclude from the first row that it takes 145 changes to go from G2 to G1, and from the second row 230 changes to get G1 from G2.

I hope this clears it up!