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[, 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 a pairwise kernel between two elements.

parse_input(X)

Parse and create features for pyramid_match 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 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[, 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 a pairwise kernel between two elements.

parse_input(X)

Parse and create features for pyramid_match 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.

__init__(n_jobs=None, normalize=False, verbose=False, with_labels=True, L=4, d=6)[source][source]#

Initialise a pyramid_match kernel.

Bibliography#

[NMV17]

Giannis Nikolentzos, Polykarpos Meladianos, and Michalis Vazirgiannis. Matching Node Embeddings for Graph Similarity. In Proceedings of the 31st AAAI Conference on Artificial Intelligence, 2429–2435. 2017.