Skip to contents

Kernel Representation Step

Kernel Representation Step

Author

Mathieu Carrière

Super classes

rgudhi::PythonClass -> rgudhi::SKLearnClass -> KernelRepresentationStep

Methods

Inherited methods


Method apply()

Applies the class on a single persistence diagram and outputs the result.

Usage

KernelRepresentationStep$apply(diag1, diag2)

Arguments

diag1

A 2-column tibble::tibble specifying a persistence diagram.

diag2

A 2-column tibble::tibble specifying a persistence diagram.

Returns

A numeric value storing the kernel-induced inner product between the two input diagrams.


Method fit()

Fits the class on a sample of persistence diagrams.

Usage

KernelRepresentationStep$fit(X, y = NULL)

Arguments

X

A list of 2-column tibble::tibbles specifying a sample of persistence diagrams.

y

An integer vector specifying persistence diagram labels (unused for now).

Returns

The class itself invisibly.


Method transform()

Applies the class on a sample of persistence diagrams.

Usage

KernelRepresentationStep$transform(X)

Arguments

X

A list of 2-column tibble::tibbles specifying a sample of persistence diagrams.

Returns

A numeric matrix of shape \(n_\mathrm{out} \times n_\mathrm{in}\) storing the kernel-induced inner product between the \(n_\mathrm{out}\) persistence diagrams passed to the $transform() method and the \(n_\mathrm{in}\) persistence diagrams passed to the $fit() method.


Method fit_transform()

Applies sequentially the $fit() and $transform() methods on a sample of persistence diagrams in a more efficient way than calling them directly.

Usage

KernelRepresentationStep$fit_transform(X, y = NULL)

Arguments

X

A list of 2-column tibble::tibbles specifying a sample of persistence diagrams.

y

An integer vector specifying persistence diagram labels (unused for now).

Returns

A numeric matrix of shape \(n \times n\) storing the kernel-induced inner product between the \(n\) persistence diagrams passed to both the $fit() and $transform() methods.


Method clone()

The objects of this class are cloneable with this method.

Usage

KernelRepresentationStep$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.