ysig/GraKeL
关于
兼容 scikit-learn 的图核库。
学习与教育实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- -1
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文
GraKeL 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, GraKeL contains 16 kernels and 2 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:
- Vertex histogram kernel
- Edge histogram kernel
- Shortest path kernel from Borgwardt and Kriegel: Shortest-path kernels on graphs (ICDM 2005)
- Graphlet kernel from Shervashidze et al.: Efficient graphlet kernels for large graph comparison (AISTATS 2009)
- Random walk kernel from Vishwanathan et al.: Graph Kernels (JMLR 11(Apr))
- Neighborhood hash graph kernel from Hido and Kashima: A Linear-time Graph Kernel (ICDM 2009)
- Weisfeiler-Lehman framework from Shervashidze et al.: Weisfeiler-Lehman Graph Kernels (JMLR 12(Sep))
- Neighborhood subgraph pairwise distance kernel from Costa and De Grave: Fast Neighborhood Subgraph Pairwise Distance Kernel (ICML 2010)
- Lovasz-theta kernel from Johansson et al.: Global graph kernels using geometric embeddings (ICML 2014)
- SVM-theta kernel from Johansson et al.: Global graph kernels using geometric embeddings (ICML 2014)
- Ordered decompositional DAG kernel from Da San Martino et al.: A Tree-Based Kernel for Graphs (SDM 2012)
- GraphHopper kernel from Feragen et al.: Scalable kernels for graphs with continuous attributes (NIPS 2013)
- Propagation kernel from Neumann et al.: Propagation kernels: efficient graph kernels from propagated information (Machine Learning 102(2))
- Pyramid match kernel from Nikolentzos et al.: Matching Node Embeddings for Graph Similarity (AAAI 2017)
- Subgraph matching kernel from Kriege and Mutzel: Subgraph Matching Kernels for Attributed Graphs (ICML 2012)
- Multiscale Laplacian kernel from Kondor and Pan: The Multiscale Laplacian Graph Kernel (NIPS 2016)
- Core framework from Nikolentzos et al.: A Degeneracy Framework for Graph Similarity (IJCAI 2018)
- Weisfeiler-Lehman optimal assignment kernel from Kriege et al.: On Valid Optimal Assignment Kernels and Applications to Graph Classification (NIPS 2016)
To learn how to install and use GraKeL, 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 and our tutorials in the tutorials/ directory.
In case you find a bug, please open an issue. To propose a new kernel, you can open a feature request.
Installation
The GraKeL library requires the following packages to be installed:
- Python (>=3.10, <3.15)
- NumPy (>=1.19.0)
- SciPy (>=1.12.0)
- scikit-learn (>=0.24.0)
- cvxopt (>=1.2.0) [optional]
- networkx (>=3.0) [optional]
To install the package, run:
$ pip install grakel
Development
To work on the source, first install uv and then sync the project (this installs the package and all its development dependencies in a .venv):
$ uv sync --all-extras
Running tests
To test the package, execute:
$ uv run pytest
Running examples
$ cd examples
$ python shortest_path.py
Cite
If you use GraKeL in a scientific publication, please cite our 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
GraKeL is distributed under the BSD 3-clause license. 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. Futhermore, the cvxopt package (a software package for convex optimization) which is an optional dependency of GraKeL is GPL licensed.
Acknowledgements
We would like to thank @SneachChea for a round of tooling, CI, and docs modernization.
We would like to thank @eddiebergman for modernizing our CI and extending our python support.
[!NOTE] GraKeL needs your support! Keeping a graph kernel library working takes ongoing maintenance — updates for newer Python/numpy, CI upkeep, etc. Feel free to help out by opening a pull request or raising an issue, or reach out via the contact info on ysig.github.io if you'd like to help maintain GraKeL more closely — happy to gradually bring you on board. Thank you! 💕
探索相关项目
加载中…