Open cookbook-ms opened 2 months ago
Sorry for the late updates.
In this update, we have the following changes:
GraphEdge
takes a graph and optional triangle list as inputs and builds a simplicial 2-complex. If no triangle list is provided, we look for all the 2-cliques. Of course, one can choose only using graph instead of simplicial 2-complex. GraphEdge
gives an eigenbasis together with their Hodge type specified, so to enable Hodge-compositional kernelMaternKarhunenLoeveKernel_HodgeCompositionEdge
defined in geometric_kernels/kernels/karhunen_loeve.py
which takes parameters for three subspaces as inputs. geometric_kernels/kernels/matern_kernel.py
, as well as in geometric_kernels/feature_maps/deterministic.py
and geometric_kernels/sampling/samplers.py
, to enable the option of using Hodge-compositional kernel. notebooks/SimplicialComplex.ipynb
, notebooks/backends/JAX_SimplicialComplex.ipynb
, and notebooks/backends/PyTorch_SimplicialComplex.ipynb
which give how to define Hodge-compositional edge kernels in a simplicial 2-complex, as well as Hodge feature maps. Please have a look at your convenience. Thanks :)
Thanks a lot, Maosheng! I plan to take a look in a week or two, after the deadline streak has passed.
This pull requests an implementation of kernels on the Edge space of a graph or a simplicial 2-complex. I implemented the following:
geometric_kernels/spaces/graph_edge.py
, which allows backends based on numpy, pytorch and jax.numpy backend:
jax and pytorch backends:
Note that: