grakel.WeisfeilerLehmanOptimalAssignment

class grakel.WeisfeilerLehmanOptimalAssignment(n_jobs=None, verbose=False, normalize=False, n_iter=5, sparse=False)[source][source]

Compute the Weisfeiler Lehman Optimal Assignment Kernel.

See [KGW16].

Parameters
n_iterint, default=5

The number of iterations.

Attributes
Xdict

Holds a list of fitted subkernel modules.

sparsebool

Defines if the data will be stored in a sparse format. Sparse format is slower, but less memory consuming and in some cases the only solution.

_nxnumber

Holds the number of inputs.

_n_iterint

Holds the number, of iterations.

_hierarchydict

A hierarchy produced by the WL relabeling procedure.

_inv_labelsdict

An inverse dictionary, used for relabeling on each iteration.

Methods

diagonal()

Calculate the kernel matrix diagonal for fitted data.

fit(X[, y])

Fit a dataset, for a transformer.

fit_transform(X[, y])

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 input for weisfeiler lehman optimal assignment.

set_params(**params)

Call the parent method.

transform(X)

Calculate the kernel matrix, between given and fitted dataset.

Initialise a weisfeiler_lehman kernel.

Attributes
X

Methods

diagonal()

Calculate the kernel matrix diagonal for fitted data.

fit(X[, y])

Fit a dataset, for a transformer.

fit_transform(X[, y])

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 input for weisfeiler lehman optimal assignment.

set_params(**params)

Call the parent method.

transform(X)

Calculate the kernel matrix, between given and fitted dataset.

__init__(n_jobs=None, verbose=False, normalize=False, n_iter=5, sparse=False)[source][source]

Initialise a weisfeiler_lehman kernel.

Bibliography

KGW16

Nils M Kriege, Pierre-Louis Giscard, and Richard Wilson. On Valid Optimal Assignment Kernels and Applications to Graph Classification. In Advances in Neural Information Processing Systems, 1623–1631. 2016.