Overview

GraKeLX is a Python package which provides implementations of several graph kernels, a family of powerful methods which allow kernel-based learning approaches such as SVMs to work directly on graphs.

GraKeLX is an independent fork of the original GraKeL library, continuing development and maintenance under the BSD 3-clause license.

Getting Started

Benchmarks

To demonstrate the efficiency of the algorithms implemented in GraKeLX, we present a comparison of the running times of the implementations of some graph kernels from GraKeLX and from other packages. We also compare the running times of the different kernels to each other.

Package Reference

A collection of all classes and functions important for the use and understanding of the GraKeLX package.

GraKeLX provides

What’s New

  • Version 0.1.13

    • Forked as GraKeLX: continued maintenance, modernised CI (uv, Ruff), extended Python support to 3.13.

    • Added networkx_from_graph: convert GraKeL graphs to NetworkX graphs (round-trip with graph_from_networkx).

    • Added graph_from_torch_geometric: load graphs from PyTorch Geometric data objects.

    • Documentation updated and published at SneachChea.github.io/GraKelX.

  • Version 0.1a8

  • Version 0.1a7

    • Detailed installation instructions for c++ extensions in windows.

    • Changed base_kernel alias in frameworks with base_graph_kernel to disambiguate with vectorial kernels.

    • Speed-up for floyd_warshall calculation in graph.py.

    • Large update throughout all the documentation.

  • Version 0.1a6

    • More scikit-learn compatibility:

      1. Initialise kernels by name and alias on GraphKernel (as GraphKernel(kernel=”shortest_path”).

      2. Fit and instantion by default parameters.

      3. Random number generator standardized check_random_state. random_seed are now random_state arguments.

      4. Doctests.

    • Miscelanous:

      1. Detailed unsupported kernel output.

      2. More detailed licensing information considering cvxopt and BLISS

      3. Small bugfix inside the (Count Sensitive) Neighborhood Hash Kernel.

      4. Added sparse-compatibility for VertexHistogram and for EdgeHistogram.

  • Version 0.1a5

    • Various bugfixes in kernel implementations.

    • Added a bunch of utils functions for external operations: transforming existing graph formats (csv, pandas, networkx) to the grakelx native, k-fold cross validation with an SVM and kernel matrix transformer for manipulating precomputed kernel matrices in an Transformer fashion.

    • Conda compatibility: visit https://anaconda.org/ysig/grakel-dev.

Indices and tables