Coder Social home page Coder Social logo

hashgraphkernel's People

Contributors

chrsmrrs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

hashgraphkernel's Issues

Use csr_matrix() constructor in hash_graph_kernel.py

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?

Process Large amount of graphs

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?

Get explicit representations for graphs

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.