Skip to contents

Metric Step

Metric Step

Author

Mathieu Carrière

Super classes

rgudhi::PythonClass -> rgudhi::SKLearnClass -> MetricStep

Methods

Inherited methods


Method apply()

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

Usage

MetricStep$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 distance between the two input diagrams.


Method fit()

Fits the class on a sample of persistence diagrams.

Usage

MetricStep$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

MetricStep$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 distances 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

MetricStep$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 distance 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

MetricStep$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.