Skip to content

Commit d040440

Browse files
committed
Update README.md.
1 parent f74ca2c commit d040440

File tree

1 file changed

+58
-8
lines changed

1 file changed

+58
-8
lines changed

README.md

Lines changed: 58 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,53 @@ A Python package for graph kernels, graph edit distances and graph pre-image pro
2222

2323
## How to use?
2424

25+
### Install the library
26+
27+
* Install stable version from PyPI (may not be up-to-date):
28+
```
29+
$ pip install graphkit-learn
30+
```
31+
32+
* Install latest version from GitHub:
33+
```
34+
$ git clone https://github.com/jajupmochi/graphkit-learn.git
35+
$ cd graphkit-learn/
36+
$ python setup.py install
37+
```
38+
39+
### Run the test
40+
41+
A series of [tests](https://github.com/jajupmochi/graphkit-learn/tree/master/gklearn/tests) can be run to check if the library works correctly.
42+
```
43+
$ pip install -U pip pytest codecov coverage pytest-cov
44+
$ pytest -v --cov-config=.coveragerc --cov-report term --cov=gklearn gklearn/tests/
45+
```
46+
47+
### Check examples
48+
49+
A series of demos of using the library can be found on [Google Colab](https://drive.google.com/drive/folders/1r2gtPuFzIys2_MZw1wXqE2w3oCoVoQUG?usp=sharing) and in the [`example`](https://github.com/jajupmochi/graphkit-learn/tree/master/gklearn/examples) folder.
50+
51+
### Other demos
52+
2553
Simply clone this repository and voilà! Then check [`notebooks`](https://github.com/jajupmochi/graphkit-learn/tree/master/notebooks) directory for demos:
2654
* [`notebooks`](https://github.com/jajupmochi/graphkit-learn/tree/master/notebooks) directory includes test codes of graph kernels based on linear patterns;
2755
* [`notebooks/tests`](https://github.com/jajupmochi/graphkit-learn/tree/master/notebooks/tests) directory includes codes that test some libraries and functions;
2856
* [`notebooks/utils`](https://github.com/jajupmochi/graphkit-learn/tree/master/notebooks/utils) directory includes some useful tools, such as a Gram matrix checker and a function to get properties of datasets;
2957
* [`notebooks/else`](https://github.com/jajupmochi/graphkit-learn/tree/master/notebooks/else) directory includes other codes that we used for experiments.
3058

31-
## List of graph kernels
59+
### Check the docs.
60+
61+
The docs of the library can be found [here](https://graphkit-learn.readthedocs.io/en/master/?badge=master).
62+
63+
## Main contents.
64+
65+
### List of graph kernels
3266

3367
* Based on walks
3468
* The common walk kernel [1]
3569
* Exponential
3670
* Geometric
37-
* The marginalized kenrel
71+
* [The marginalized kenrel](https://github.com/jajupmochi/graphkit-learn/blob/master/gklearn/kernels/marginalized.py)
3872
* With tottering [2]
3973
* Without tottering [7]
4074
* The generalized random walk kernel [3]
@@ -43,15 +77,27 @@ Simply clone this repository and voilà! Then check [`notebooks`](https://github
4377
* Fixed-point iterations
4478
* Spectral decomposition
4579
* Based on paths
46-
* The shortest path kernel [4]
47-
* The structural shortest path kernel [5]
48-
* The path kernel up to length h [6]
80+
* [The shortest path kernel](https://github.com/jajupmochi/graphkit-learn/blob/master/gklearn/kernels/shortest_path.py) [4]
81+
* [The structural shortest path kernel](https://github.com/jajupmochi/graphkit-learn/blob/master/gklearn/kernels/structural_sp.py) [5]
82+
* [The path kernel up to length h](https://github.com/jajupmochi/graphkit-learn/blob/master/gklearn/kernels/path_up_to_h.py) [6]
4983
* The Tanimoto kernel
5084
* The MinMax kernel
5185
* Non-linear kernels
52-
* The treelet kernel [10]
53-
* Weisfeiler-Lehman kernel [11]
54-
* Subtree
86+
* [The treelet kernel](https://github.com/jajupmochi/graphkit-learn/blob/master/gklearn/kernels/treelet.py) [10]
87+
* [Weisfeiler-Lehman kernel](https://github.com/jajupmochi/graphkit-learn/blob/master/gklearn/kernels/weisfeiler_lehman.py) [11]
88+
* [Subtree](https://github.com/jajupmochi/graphkit-learn/blob/master/gklearn/kernels/weisfeiler_lehman.py#L479)
89+
90+
A demo of computing graph kernels can be found on [Google Colab](https://colab.research.google.com/drive/17Q2QCl9CAtDweGF8LiWnWoN2laeJqT0u?usp=sharing) and in the [`examples`](https://github.com/jajupmochi/graphkit-learn/blob/master/gklearn/examples/compute_graph_kernel.py) folder.
91+
92+
### Graph Edit Distances
93+
94+
### Graph preimage methods
95+
96+
A demo of generating graph preimages can be found on [Google Colab](https://colab.research.google.com/drive/1PIDvHOcmiLEQ5Np3bgBDdu0kLOquOMQK?usp=sharing) and in the [`examples`](https://github.com/jajupmochi/graphkit-learn/blob/master/gklearn/examples/median_preimege_generator.py) folder.
97+
98+
### Interface to `GEDLIB`
99+
100+
[`GEDLIB`](https://github.com/dbblumenthal/gedlib) is an easily extensible C++ library for (suboptimally) computing the graph edit distance between attributed graphs. A Python interface for `GEDLIB` is integrated in this library, based on [`gedlibpy`](https://github.com/Ryurin/gedlibpy) library.
55101

56102
## Computation optimization methods
57103

@@ -81,6 +127,10 @@ Linlin Jia, Benoit Gaüzère, and Paul Honeine. Graph Kernels Based on Linear Pa
81127

82128
A comparison of performances of graph kernels on benchmark datasets can be found [here](https://graphkit-learn.readthedocs.io/en/master/experiments.html).
83129

130+
## How to contribute
131+
132+
Fork the library and open a pull request! Make your own contribute to the community!
133+
84134
## References
85135
[1] Thomas Gärtner, Peter Flach, and Stefan Wrobel. On graph kernels: Hardness results and efficient alternatives. Learning Theory and Kernel Machines, pages 129–143, 2003.
86136

0 commit comments

Comments
 (0)