grakel.RandomWalkLabeled

class grakel.RandomWalkLabeled(n_jobs=None, normalize=False, verbose=False, lamda=0.1, method_type='fast', kernel_type='geometric', p=None)[source][source]

The labeled random walk kernel class.

See [KTI03], [GartnerFW03] and [VBS07].

Parameters
lambdafloat

A lambda factor concerning summation.

method_typestr, valid_values={“baseline”, “fast”}
The method to use for calculating random walk kernel [geometric]:
kernel_typestr, valid_values={“geometric”, “exponential”}

Defines how inner summation will be applied.

pint, optional

If initialised defines the number of steps.

Attributes
_lamdafloat, default=0.1

A lambda factor concerning summation.

_kernel_typestr, valid_values={“geometric”, “exponential”},
default=”geometric”

Defines how inner summation will be applied.

_method_typestr valid_values={“baseline”, “fast”},
default=”fast”
The method to use for calculating random walk kernel:
_pint, default=1

If not -1, the number of steps of the random walk kernel.

Methods

diagonal()

Calculate the kernel matrix diagonal of the fit/transformed data.

fit(X[, y])

Fit a dataset, for a transformer.

fit_transform(X)

Fit and transform, on the same dataset.

get_params([deep])

Get parameters for this estimator.

initialize()

Initialize all transformer arguments, needing initialization.

pairwise_operation(X, Y)

Calculate the labeled random walk kernel.

parse_input(X)

Parse and create features for graphlet_sampling kernel.

set_params(**params)

Call the parent method.

transform(X)

Calculate the kernel matrix, between given and fitted dataset.

Initialise a labeled random_walk kernel.

Attributes
X

Methods

diagonal()

Calculate the kernel matrix diagonal of the fit/transformed data.

fit(X[, y])

Fit a dataset, for a transformer.

fit_transform(X)

Fit and transform, on the same dataset.

get_params([deep])

Get parameters for this estimator.

initialize()

Initialize all transformer arguments, needing initialization.

pairwise_operation(X, Y)

Calculate the labeled random walk kernel.

parse_input(X)

Parse and create features for graphlet_sampling kernel.

set_params(**params)

Call the parent method.

transform(X)

Calculate the kernel matrix, between given and fitted dataset.

__init__(n_jobs=None, normalize=False, verbose=False, lamda=0.1, method_type='fast', kernel_type='geometric', p=None)[source][source]

Initialise a labeled random_walk kernel.

Bibliography

GartnerFW03(1,2,3)

Thomas Gärtner, Peter Flach, and Stefan Wrobel. On Graph Kernels: Hardness Results and Efficient Alternatives. In Learning Theory and Kernel Machines, 129–143. 2003.

KTI03(1,2,3)

Hisashi Kashima, Koji Tsuda, and Akihiro Inokuchi. Marginalized Kernels Between Labeled Graphs. In Proceedings of the 20th Conference in Machine Learning, 321–328. 2003.

VBS07(1,2,3)

S.V.N. Vishwanathan, Karsten M. Borgwardt, and Nicol N. Schraudolph. Fast Computation of Graph Kernels. In Advances in Neural Information Processing Systems, 1449–1456. 2007.