grakel.OddSth

class grakel.OddSth(n_jobs=None, normalize=False, verbose=False, h=None)[source][source]

ODD-Sth kernel as proposed in [DSMNS12].

Parameters
hint, default=None

Maximum (single) dag height. If None there is no restriction.

Attributes
_nxint

The number of parsed inputs on fit.

_nyint

The number of parsed inputs on transform.

_phi_xnp.array, n_dim=2

A numpy array corresponding all the frequency values for each vertex, coresponding to the fitted data, in the resulting bigDAG of the fitted and transformed data.

_phi_ynp.array, n_dim=2

A numpy array corresponding all the frequency values for each vertex, corresponding to the transformed data, in the resulting bigDAG of the fitted and transformed data.

_Cnp.array, n_dim=1

A numpy array corresponding to the vertex depth of each node, in the resulting bigDAG of the fitted and transformed data.

Methods

diagonal()

Calculate the kernel matrix diagonal of the 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 and create features for the propagation kernel.

set_params(**params)

Call the parent method.

transform(X)

Calculate the kernel matrix, between given and fitted dataset.

Initialise an odd_sth 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[, 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 and create features for the propagation kernel.

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, h=None)[source][source]

Initialise an odd_sth kernel.

Bibliography

DSMNS12

Giovanni Da San Martino, Nicolo Navarin, and Alessandro Sperduti. A Tree-Based Kernel for Graphs. In Proceedings of the 2012 SIAM International Conference on Data Mining. 2012.