grakel.RandomWalk#
- class grakel.RandomWalk(n_jobs=None, normalize=False, verbose=False, lamda=0.1, method_type='fast', kernel_type='geometric', p=None)[source][source]#
The 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:
“baseline” Complexity: \(O(|V|^6)\) (see [KTI03], [GartnerFW03])
“fast” Complexity: \(O((|E|+|V|)|V||M|)\) (see [VBS07])
- kernel_typestr, valid_values={“geometric”, “exponential”}
Defines how inner summation will be applied.
- pint or None
If initialised defines the number of steps.
- Attributes:
- mu_list
List of coefficients concerning a finite sum, in case p is not None.
Methods
diagonal()Calculate the kernel matrix diagonal of the fit/transformed data.
fit(X[, y])Fit a dataset, for a transformer.
fit_transform(X[, y])Fit and transform, on the same dataset.
get_metadata_routing()Get metadata routing of this object.
get_params([deep])Get parameters for this estimator.
initialize()Initialize all transformer arguments, needing initialization.
pairwise_operation(X, Y)Calculate the random walk kernel.
parse_input(X)Parse and create features for random_walk kernel.
set_output(*[, transform])Set output container.
set_params(**params)Call the parent method.
transform(X)Calculate the kernel matrix, between given and fitted dataset.
Initialise a 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[, y])Fit and transform, on the same dataset.
get_metadata_routing()Get metadata routing of this object.
get_params([deep])Get parameters for this estimator.
initialize()Initialize all transformer arguments, needing initialization.
pairwise_operation(X, Y)Calculate the random walk kernel.
parse_input(X)Parse and create features for random_walk kernel.
set_output(*[, transform])Set output container.
set_params(**params)Call the parent method.
transform(X)Calculate the kernel matrix, between given and fitted dataset.
Bibliography#
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.