grakel.VertexHistogram#

class grakel.VertexHistogram(n_jobs=None, normalize=False, verbose=False, sparse='auto')[source][source]#

Vertex Histogram kernel as found in [SB15].

Parameters:
sparsebool, or ‘auto’, default=’auto’

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. If ‘auto’, uses a sparse matrix when the number of zeros is more than the half of the matrix size. In all cases if the dense matrix doesn’t fit system memory, I sparse approach will be tried.

Attributes:
None.

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_metadata_routing()

Get metadata routing of this object.

get_params([deep])

Get parameters for this estimator.

initialize()

Initialize all transformer arguments, needing initialisation.

pairwise_operation(x, y)

Calculate a pairwise kernel between two elements.

parse_input(X)

Parse and check the given input for VH 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 vertex histogram 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_metadata_routing()

Get metadata routing of this object.

get_params([deep])

Get parameters for this estimator.

initialize()

Initialize all transformer arguments, needing initialisation.

pairwise_operation(x, y)

Calculate a pairwise kernel between two elements.

parse_input(X)

Parse and check the given input for VH 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, sparse='auto')[source][source]#

Initialise a vertex histogram kernel.

Bibliography#

[SB15]

Mahito Sugiyama and Karsten M. Borgwardt. Halting in Random Walk Kernels. In Advances in Neural Information Processing Systems, 1639–1647. 2015.

Examples using grakel.VertexHistogram#

Optimizing hyperparameters

Optimizing hyperparameters

Weisfeiler-Lehman subtree kernel

Weisfeiler-Lehman subtree kernel

Document retrieval

Document retrieval