grakel.PropagationAttr

class grakel.PropagationAttr(n_jobs=None, verbose=False, normalize=False, random_state=None, metric=<function _dot>, M='L1', t_max=5, w=4)[source][source]

The Propagation kernel for fully attributed graphs.

See [NGBK15]: Algorithms 1, 3, p. 216, 221.

Parameters
t_maxint, default=5

Maximum number of iterations.

wint, default=0.01

Bin width.

Mstr, default=”TV”
The preserved distance metric (on local sensitive hashing):
  • “L1”: l1-norm

  • “L2”: l2-norm

metricfunction (np.array, np.array -> number),

default=:math:f(x,y)=sum_{i} x_{i}*y_{i} A metric between two 1-dimensional numpy arrays of numbers that outputs a number.

Attributes
Mstr

The preserved distance metric (on local sensitive hashing).

tmaxint

Holds the maximum number of iterations.

wint

Holds the bin width.

metricfunction (np.array, np.array -> number)

A metric between two 1-dimensional numpy arrays of numbers that outputs a number.

Methods

calculate_LSH(X, u, b)

Calculate Local Sensitive Hashing needed for propagation kernels.

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 the kernel value between two elements.

parse_input(X)

Parse and create features for the attributed propation kernel.

set_params(**params)

Call the parent method.

transform(X)

Calculate the kernel matrix, between given and fitted dataset.

Initialise a propagation kernel.

Attributes
X

Methods

calculate_LSH(X, u, b)

Calculate Local Sensitive Hashing needed for propagation kernels.

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 the kernel value between two elements.

parse_input(X)

Parse and create features for the attributed propation kernel.

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, random_state=None, metric=<function _dot>, M='L1', t_max=5, w=4)[source][source]

Initialise a propagation kernel.

Bibliography

NGBK15

Marion Neumann, Roman Garnett, Christian Bauckhage, and Kristian Kersting. Propagation kernels: efficient graph kernels from propagated information. Machine Learning, 102:209–245, 2015.