grakel
.GraphHopper¶
- class grakel.GraphHopper(n_jobs=None, normalize=False, verbose=False, kernel_type='linear')[source][source]¶
Graph Hopper Histogram kernel as found in [FKP+13].
- Parameters
- kernel_typestr, tuple or function
- For kernel_type of type:
str can either be ‘linear’, ‘gaussian’, ‘bridge’.
tuple can be of the form (‘gaussian’, mu) where mu is a number.
function can be a function that takes two tuples of np.arrays for each graph corresponding to the M matrix and the attribute matrix and returns a number.
- Attributes
- metric_function
The base metric applied between features.
- calculate_norm_bool
Defines if the norm of the attributes will be calculated (in order to avoid recalculation when using it with e.g. gaussian).
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)Graph Hopper kernel as proposed in [FKP+13].
parse_input
(X)Parse and check the given input for the Graph Hopper kernel.
set_params
(**params)Call the parent method.
transform
(X)Calculate the kernel matrix, between given and fitted dataset.
Initialize an Graph Hopper 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)Graph Hopper kernel as proposed in [FKP+13].
parse_input
(X)Parse and check the given input for the Graph Hopper kernel.
set_params
(**params)Call the parent method.
transform
(X)Calculate the kernel matrix, between given and fitted dataset.