grakel.PyramidMatch¶
- class grakel.PyramidMatch(n_jobs=None, normalize=False, verbose=False, with_labels=True, L=4, d=6)[source][source]¶
Pyramid match kernel class.
Kernel defined in [NMV17]
- Parameters
- with_labelsbool, default=True
A flag that determines if the kernel computation will consider labels.
- Lint, default=4
Pyramid histogram level.
- dint, default=6
The dimension of the hypercube.
- Attributes
- _num_labelsint
The number of distinct labels, on the fit data.
- _labelsdict
A dictionary of label enumeration, made from fitted data.
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 a pairwise kernel between two elements.
parse_input(X)Parse and create features for pyramid_match kernel.
set_params(**params)Call the parent method.
transform(X)Calculate the kernel matrix, between given and fitted dataset.
Initialise a pyramid_match 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 a pairwise kernel between two elements.
parse_input(X)Parse and create features for pyramid_match kernel.
set_params(**params)Call the parent method.
transform(X)Calculate the kernel matrix, between given and fitted dataset.