grakelx.VertexHistogram

class grakelx.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

Examples using grakelx.VertexHistogram

Graph classification on MUTAG using the Weisfeiler-Lehman subtree kernel.

Graph classification on MUTAG using the Weisfeiler-Lehman subtree kernel.

Performing cross-validation n times, optimizing SVM’s and kernel’s hyperparameters.

Performing cross-validation n times, optimizing SVM's and kernel's hyperparameters.

Retrieval of most similar document using the Weisfeiler-Lehman subtree kernel.

Retrieval of most similar document using the Weisfeiler-Lehman subtree kernel.