GeometricKernels icon indicating copy to clipboard operation
GeometricKernels copied to clipboard

Implementation of kernels on the edge space of graphs or simplicial complexes

Open cookbook-ms opened this issue 7 months ago • 0 comments

This pull requests an implementation of kernels on the Edge space of a graph or a simplicial 2-complex. I implemented the following:

  1. the discrete space of edge space: written as a class in geometric_kernels/spaces/graph_edge.py, which allows backends based on numpy, pytorch and jax.
  2. tutorials on this, as how graph kernel tutorial looks like. This includes:
  • numpy backend:

an example of the edge space of a graph, written in jupyter notebook in notebooks/EdgeSpaceGraph.ipynb an example of the edge space of a simplicial 2-complex, written in notebooks/EdgeSpaceSimplicialComplex

  • jax and pytorch backends:

an example of the edge space of a graph, written in notebooks/backends/Jax_EdgeSpaceGraph.ipynb and notebooks/backends/PyTorch_EdgeSpaceGraph.ipynb an example of the edge space of a simplicial 2-complex, written in notebooks/backends/Jax_EdgeSpaceSimplicialComplex and notebooks/backends/PyTorch_EdgeSpaceSimplicialComplex

  1. testing on the space of GraphEdge: written in "tests/spaces/test_graph_edge.py"

Note that:

  • The above 8 files are the ones I wrote. All the modifications elsewhere are only about that I added few lines to look for the correct path of the geometric_kernels module (without installing it, since I need to test my own GraphEdge space).
  • The current implementation in fact does not contain Hodge-compositional kernels, instead, they are using the one set of kernel parameters on the whole eigenspace. To implement the Hodge-compositional kernels, we can define the three sets of eigenspaces individually, then allowing different sets of parameters.

cookbook-ms avatar Jul 19 '24 14:07 cookbook-ms