Skip to content

Commit be4f169

Browse files
authored
Merge pull request #27 from jajupmochi/v0.2
V0.2
2 parents e9cec0a + 97257a5 commit be4f169

File tree

3 files changed

+28
-17
lines changed

3 files changed

+28
-17
lines changed

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -62,44 +62,44 @@ The docs of the library can be found [here](https://graphkit-learn.readthedocs.i
6262

6363
## Main contents
6464

65-
### List of graph kernels
65+
### 1 List of graph kernels
6666

6767
* Based on walks
68-
* The common walk kernel [1]
68+
* [The common walk kernel](gklearn/kernels/common_walk.py) [1]
6969
* Exponential
7070
* Geometric
71-
* [The marginalized kenrel](https://github.com/jajupmochi/graphkit-learn/blob/master/gklearn/kernels/marginalized.py)
71+
* [The marginalized kenrel](gklearn/kernels/marginalized.py)
7272
* With tottering [2]
7373
* Without tottering [7]
74-
* The generalized random walk kernel [3]
75-
* Sylvester equation
74+
* [The generalized random walk kernel](gklearn/kernels/random_walk.py) [3]
75+
* [Sylvester equation](gklearn/kernels/sylvester_equation.py)
7676
* Conjugate gradient
7777
* Fixed-point iterations
78-
* Spectral decomposition
78+
* [Spectral decomposition](gklearn/kernels/spectral_decomposition.py)
7979
* Based on paths
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]
80+
* [The shortest path kernel](gklearn/kernels/shortest_path.py) [4]
81+
* [The structural shortest path kernel](gklearn/kernels/structural_sp.py) [5]
82+
* [The path kernel up to length h](gklearn/kernels/path_up_to_h.py) [6]
8383
* The Tanimoto kernel
8484
* The MinMax kernel
8585
* Non-linear kernels
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)
86+
* [The treelet kernel](gklearn/kernels/treelet.py) [10]
87+
* [Weisfeiler-Lehman kernel](gklearn/kernels/weisfeiler_lehman.py) [11]
88+
* [Subtree](gklearn/kernels/weisfeiler_lehman.py#L479)
8989

9090
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.
9191

92-
### Graph Edit Distances
92+
### 2 Graph Edit Distances
9393

94-
### Graph preimage methods
94+
### 3 Graph preimage methods
9595

9696
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.
9797

98-
### Interface to `GEDLIB`
98+
### 4 Interface to `GEDLIB`
9999

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](https://github.com/jajupmochi/graphkit-learn/tree/master/gklearn/gedlib) for `GEDLIB` is integrated in this library, based on [`gedlibpy`](https://github.com/Ryurin/gedlibpy) library.
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](gklearn/gedlib) for `GEDLIB` is integrated in this library, based on [`gedlibpy`](https://github.com/Ryurin/gedlibpy) library.
101101

102-
### Computation optimization methods
102+
### 5 Computation optimization methods
103103

104104
* Python’s `multiprocessing.Pool` module is applied to perform **parallelization** on the computations of all kernels as well as the model selection.
105105
* **The Fast Computation of Shortest Path Kernel (FCSP) method** [8] is implemented in *the random walk kernel*, *the shortest path kernel*, as well as *the structural shortest path kernel* where FCSP is applied on both vertex and edge kernels.

gklearn/kernels/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,13 @@
1818
from gklearn.kernels.path_up_to_h import PathUpToH
1919
from gklearn.kernels.treelet import Treelet
2020
from gklearn.kernels.weisfeiler_lehman import WeisfeilerLehman, WLSubtree
21+
22+
# old version.
23+
from gklearn.kernels.commonWalkKernel import commonwalkkernel
24+
from gklearn.kernels.marginalizedKernel import marginalizedkernel
25+
from gklearn.kernels.randomWalkKernel import randomwalkkernel
26+
from gklearn.kernels.spKernel import spkernel
27+
from gklearn.kernels.structuralspKernel import structuralspkernel
28+
from gklearn.kernels.untilHPathKernel import untilhpathkernel
29+
from gklearn.kernels.treeletKernel import treeletkernel
30+
from gklearn.kernels.weisfeilerLehmanKernel import weisfeilerlehmankernel

gklearn/utils/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@
2424
from gklearn.utils.utils import normalize_gram_matrix, compute_distance_matrix
2525
from gklearn.utils.trie import Trie
2626
from gklearn.utils.knn import knn_cv, knn_classification
27+
from gklearn.utils.model_selection_precomputed import model_selection_for_precomputed_kernel

0 commit comments

Comments
 (0)