priba / aproximated_ged Goto Github PK
View Code? Open in Web Editor NEWBunch of aproximated graph edit distance algorithms.
License: MIT License
Bunch of aproximated graph edit distance algorithms.
License: MIT License
Hi there. Thanks for making this project available. Can I use it to get the actual editing steps ("edit path") involved?
For example, say I load from the example the graphs for letters A (g1) and E (g2), and I use VanillaHED
. Then
ged.ged(g1, g2)
(2.8510674059664303, (array([0, 1, 2, 5, 4]), array([0, 1, 2, 4, 4, 3])))
From those two arrays, can I deduce the edit operations? Like which nodes and which edges were inserted and deleted?
I get an error related to networkx when running main.py. I have networkx installed (v2.1) and have used it in other projects. What version of networkx is your build for?
Trace:
~/Desktop/CSCE899/aproximated_ged-master$ ./main.py
Traceback (most recent call last):
File "./main.py", line 38, in
distAED, _ = aed.ged(g1, g2)
File "/home/chris/Desktop/CSCE899/aproximated_ged-master/AproximatedEditDistance.py", line 89, in ged
cost_matrix = self.cost_matrix(g1, g2)
File "/home/chris/Desktop/CSCE899/aproximated_ged-master/AproximatedEditDistance.py", line 63, in cost_matrix
np.fill_diagonal(cost_matrix[len(g1):, 0:len(g2)], self.node_insertion(g1)+self.edge_insertion(g1.edge.values()))
AttributeError: 'Graph' object has no attribute 'edge'
Compilation failure in both AED and HED when attempting the following line:
v1 = [list(chain.from_iterable(l.values())) for l in values1]
My Python-fu is not strong enough to reason through this line get past this issue. Running Python2.7.
./main.py
Traceback (most recent call last):
File "./main.py", line 38, in
distAED, _ = aed.ged(g1, g2)
File "/home/chris/Desktop/CSCE899/aproximated_ged-master/AproximatedEditDistance.py", line 89, in ged
cost_matrix = self.cost_matrix(g1, g2)
File "/home/chris/Desktop/CSCE899/aproximated_ged-master/AproximatedEditDistance.py", line 70, in cost_matrix
node_dist = self.node_substitution(g1, g2)
File "/home/chris/Desktop/CSCE899/aproximated_ged-master/VanillaAED.py", line 52, in node_substitution
v1 = [list(chain.from_iterable(l.values())) for l in values1]
TypeError: 'int' object is not iterable
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.