grakel
.NeighborhoodSubgraphPairwiseDistance¶
- class grakel.NeighborhoodSubgraphPairwiseDistance(n_jobs=None, normalize=False, verbose=False, r=3, d=4)[source][source]¶
The Neighborhood subgraph pairwise distance kernel.
See [CDG10].
- Parameters
- rint, default=3
The maximum considered radius between vertices.
- dint, default=4
Neighborhood depth.
- Attributes
- _ngxint
The number of graphs upon fit.
- _ngyint
The number of graphs upon transform.
- _fit_keysdict
A dictionary with keys from 0 to _d+1, constructed upon fit holding an enumeration of all the found (in the fit dataset) tuples of two hashes and a radius in this certain level.
- _X_level_norm_factordict
A dictionary with keys from 0 to _d+1, that holds the self calculated kernel [krg(X_i, X_i) for i=1:ngraphs_X] for all levels.
Methods
diagonal
()Calculate the kernel matrix diagonal of the fitted 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 a pairwise kernel between two elements.
parse_input
(X)Parse and create features for the NSPD kernel.
set_params
(**params)Call the parent method.
transform
(X[, y])Calculate the kernel matrix, between given and fitted dataset.
Initialize an NSPD kernel.
- Attributes
- X
Methods
diagonal
()Calculate the kernel matrix diagonal of the fitted 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 a pairwise kernel between two elements.
parse_input
(X)Parse and create features for the NSPD kernel.
set_params
(**params)Call the parent method.
transform
(X[, y])Calculate the kernel matrix, between given and fitted dataset.