grakel.SvmTheta#

class grakel.SvmTheta(n_jobs=None, normalize=False, verbose=False, random_state=None, n_samples=50, subsets_size_range=(2, 8), metric=<function _inner>)[source][source]#

Calculate the SVM theta kernel.

See [JJDB14].

Parameters:
X,Yvalid-graph-format

The pair of graphs on which the kernel is applied.

n_samplesint, default=50

Number of samples.

subsets_size_rangetuple, len=2, default=(2,8)

(min, max) size of the vertex set of sampled subgraphs.

metricfunction (number, number -> number), default=:math:f(x,y)=x*y

The applied metric between the svm_theta numbers of the two graphs.

random_stateRandomState or int, default=None

A random number generator instance or an int to initialize a RandomState as a seed.

Attributes:
random_state_RandomState

A RandomState object handling all randomness of the class.

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)

Lovasz theta kernel as proposed in [JJDB14].

parse_input(X)

Parse and create features for svm_theta 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 lovasz_theta 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)

Lovasz theta kernel as proposed in [JJDB14].

parse_input(X)

Parse and create features for svm_theta 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, random_state=None, n_samples=50, subsets_size_range=(2, 8), metric=<function _inner>)[source][source]#

Initialise a lovasz_theta kernel.

Bibliography#

[JJDB14] (1,2,3,4,5)

Fredrik Johansson, Vinay Jethava, Devdatt Dubhashi, and Chiranjib Bhattacharyya. Global graph kernels using geometric embeddings. In Proceedings of the 31st International Conference on Machine Learning, 694–702. 2014.