Skip to content

Repository files navigation

GraKeLX Logo


Note

grakelx is an independent fork of GraKeL by Siglidis, Nikolentzos, Limnios, Giatsidis, Skianis, and Vazirgiannis, originally published in JMLR 2020. This fork continues maintenance and development under the BSD 3-clause license. See LICENSE and the Acknowledgements section below.

Pypi Versions

Documentation | Paper

grakelx is a library that provides implementations of several well-established graph kernels. The library unifies these kernels into a common framework. Furthermore, it provides implementations of some frameworks that work on top of graph kernels. Specifically, grakelx contains 16 kernels and 3 frameworks. The library is compatible with the scikit-learn pipeline allowing easy and fast integration inside machine learning algorithms.


In detail, the following kernels and frameworks are currently implemented:


To learn how to install and use grakelx, and to find out more about the implemented kernels and frameworks, please read our documentation. To learn about the functionality of the library and about example applications, check out our examples in the examples/ directory.

In case you find a bug, please open an issue. To propose a new kernel, you can open a feature request.

Installation

grakelx requires the following packages to be installed:

  • Python (>=3.10)
  • NumPy (>=1.23.0)
  • SciPy (>=1.8.0)
  • Cython (>=0.29.36)
  • cvxopt (>=1.2.0) [optional]
  • future (>=0.16.0)

To install the package, run:

pip install grakelx

For local development with uv:

uv sync --group test
uv run python setup.py build_ext --inplace
uv run pre-commit install

Running tests

To test the package, execute:

uv run pytest

Running examples

cd examples
python shortest_path.py

Cite

If you use grakelx in a scientific publication, please cite the original GraKeL paper (http://jmlr.org/papers/volume21/18-370/18-370.pdf):

@article{JMLR:v21:18-370,
  author  = {Giannis Siglidis and Giannis Nikolentzos and Stratis Limnios and Christos Giatsidis and Konstantinos Skianis and Michalis Vazirgiannis},
  title   = {GraKeL: A Graph Kernel Library in Python},
  journal = {Journal of Machine Learning Research},
  year    = {2020},
  volume  = {21},
  number  = {54},
  pages   = {1-5}
}

License

grakelx is distributed under the BSD 3-clause license (same as the original GraKeL). The library makes use of the C++ source code of BLISS (a tool for computing automorphism groups and canonical labelings of graphs) which is LGPL licensed. Furthermore, the cvxopt package (a software package for convex optimization) which is an optional dependency of grakelx is GPL licensed.

Acknowledgements

We would like to thank @eddiebergman for modernizing the original GraKeL CI and extending Python support.

This project is a fork of GraKeL by Giannis Siglidis, Giannis Nikolentzos, Stratis Limnios, Christos Giatsidis, Konstantinos Skianis, and Michalis Vazirgiannis, originally published in JMLR 2020 (paper). The original copyright holders are the GraKeL developers. All modifications and additions in this fork are released under the same BSD 3-clause license.

About

A fork of the original GraKel library

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages