gklearn.kernels.marginalizedKernel

@author: linlin

@references:

[1] H. Kashima, K. Tsuda, and A. Inokuchi. Marginalized kernels between labeled graphs. In Proceedings of the 20th International Conference on Machine Learning, Washington, DC, United States, 2003.

[2] Pierre Mahé, Nobuhisa Ueda, Tatsuya Akutsu, Jean-Luc Perret, and Jean-Philippe Vert. Extensions of marginalized graph kernels. In Proceedings of the twenty-first international conference on Machine learning, page 70. ACM, 2004.

marginalizedkernel(*args, node_label='atom', edge_label='bond_type', p_quit=0.5, n_iteration=20, remove_totters=False, n_jobs=None, verbose=True)[source]

Calculate marginalized graph kernels between graphs.

Gn : List of NetworkX graph
List of graphs between which the kernels are calculated.
G1, G2 : NetworkX graphs
Two graphs between which the kernel is calculated.
node_label : string
Node attribute used as symbolic label. The default node label is ‘atom’.
edge_label : string
Edge attribute used as symbolic label. The default edge label is ‘bond_type’.
p_quit : integer
The termination probability in the random walks generating step.
n_iteration : integer
Time of iterations to calculate R_inf.
remove_totters : boolean
Whether to remove totterings by method introduced in [2]. The default value is False.
n_jobs : int
Number of jobs for parallelization.
Kmatrix : Numpy matrix
Kernel matrix, each element of which is the marginalized kernel between 2 praphs.
wrapper_marg_do(node_label, edge_label, p_quit, n_iteration, itr)[source]
wrapper_untotter(Gn, node_label, edge_label, i)[source]