leojklarner / gauche

A Library for Gaussian Processes in Chemistry
https://leojklarner.github.io/gauche/
MIT License
214 stars 22 forks source link

Add graph kernel experiments #49

Closed InfProbSciX closed 1 year ago

InfProbSciX commented 1 year ago

This PR shows how a graph kernel can be used, constructed using the interpretation: k(g_i, g_j) = <phi(g_i), phi(g_j)>, using a feature function phi that maps from a space of graphs to the reals. We use torch_geometric's WLConv implementation to create the feature function, to define a WL graph kernel, and run it on the four datasets as in other notebooks.

This is a much cleaner and maintainable implementation than that of #24, and while there's a loss of other external kernels such as the ones that GraKel offers, the WL kernel has been shown by our previous work to outperform all the others, so we have the main functionality needed.