chrsmrrs / hashgraphkernel Goto Github PK
View Code? Open in Web Editor NEWSource code for our IEEE ICDM 2016 paper "Faster Kernels for Graphs with Continuous Attributes".
Source code for our IEEE ICDM 2016 paper "Faster Kernels for Graphs with Continuous Attributes".
Hey,
executing wl.weisfeiler_lehman_subtree_kernel
with use_gram_matrix = True
and kernel_parameters_wl = [3, True, False, 0]
gives the following error.
Traceback (most recent call last):
File "hash_graph_kernels.py", line 156, in <module>
main()
File "hash_graph_kernels.py", line 130, in main
scale_attributes=True, lsh_bin_width=1.0, sigma=1.0, use_gram_matrices=True)
File "/media/sf_SEML/code/examples/hashgraphkernel/graphkernel/hash_graph_kernel.py", line 52, in hash_graph_kernel
feature_vectors = feature_vectors.tocsr()
AttributeError: 'numpy.ndarray' object has no attribute 'tocsr'
By using feature_vectors = sparse.csr_matrix(feature_vectors)
this works out.
@chrsmrrs , what do you think?
Thanks for your outstanding job! I am trying to use this HashGraphKernel to calculate similarities between a large number of graphs. However, the number of graphs is too large (about 20,000) to be processed (it will be killed because of out of memory). I want to separate them to avoid out of memory, but it seems some operations have to be taken for all graphs at the same time. Do you have any ideas to solve this problem?
Hi, I just read your paper and try to use your code. As I am not familiar with this area, I got many questions. In the code, the gram matrix is computed for downstream tasks. So I wonder whether the gram matrix is the implicit representation of graphs or explicit representation. It seems the similarity can be calculated by the representation of graphs in each line and also the elements in the matrix already represent their similarity
By the way, your work is very interesting and useful. And I learn a lot from it!
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.