GeometricKernels
GeometricKernels copied to clipboard
Implementation of kernels on the edge space of graphs or simplicial complexes
This pull requests an implementation of kernels on the Edge space of a graph or a simplicial 2-complex. I implemented the following:
- 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. - 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 innotebooks/EdgeSpaceSimplicialComplex
- jax and pytorch backends:
an example of the edge space of a graph, written in
notebooks/backends/Jax_EdgeSpaceGraph.ipynb
andnotebooks/backends/PyTorch_EdgeSpaceGraph.ipynb
an example of the edge space of a simplicial 2-complex, written innotebooks/backends/Jax_EdgeSpaceSimplicialComplex
andnotebooks/backends/PyTorch_EdgeSpaceSimplicialComplex
- 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.