Computes measure vectorization (e.g. point clouds, persistence diagrams, etc.) after a quantisation step according to the Atol algorithm (Royer et al. 2021) .
Super classes
rgudhi::PythonClass
-> rgudhi::SKLearnClass
-> rgudhi::VectorRepresentationStep
-> Atol
Methods
Method new()
The Atol
constructor.
Arguments
quantiser
An object of class
BaseClustering
specifying any clustering algorithm from the sklearn.cluster module. It will be fitted when the$fit()
method is called.weighting_method
A string specifying the constant generic function for weighting the measure points. Choices are either
"cloud"
or"iidproba"
. Defaults to"cloud"
, i.e. the measure is seen as a point cloud. This will have no impact if weights are provided along with measures all the way, i.e. at$fit()
and$transform()
calls, through the optional argumentsample_weight
.contrast
A string specifying the constant function for evaluating proximity of a measure with respect to centers. Choices are either
"gaussian"
or"laplacian"
or"indicator"
. Defaults to"gaussian"
(see page 3 in Royer et al. (2021) ).
Method apply()
Applies the Atol
class on a single persistence diagram
and outputs the result.
Arguments
diag
A 2-column tibble::tibble specifying a persistence diagram.
Returns
A tibble::tibble storing the ATol representation of the persistence diagram in a table suitable for visualization.
Examples
if (FALSE) { # reticulate::py_module_available("gudhi")
X <- seq_circle(10)
ac <- AlphaComplex$new(points = X)
st <- ac$create_simplex_tree()
dgm <- st$compute_persistence()$persistence_intervals_in_dimension(0)
ds <- DiagramSelector$new(use = TRUE)
dgm <- ds$apply(dgm)
km <- KMeans$new(n_clusters = 2, random_state = 202006)
vr <- Atol$new(quantiser = km)
vr$apply(dgm)
vr$fit_transform(list(dgm))
}