This is a class for preprocessing persistence diagrams with a given list of scalers, such as those included in scikit-learn.
Super classes
rgudhi::PythonClass -> rgudhi::SKLearnClass -> rgudhi::PreprocessingStep -> DiagramScaler
Methods
Inherited methods
Method new()
The DiagramScaler constructor.
Usage
DiagramScaler$new(use = FALSE, scalers = list())Arguments
useA boolean value specifying whether to use the class. Defaults to
FALSE.scalersA list of scalers to be fit on the persistence diagrams. Defaults to
list()which is an empty list. Each element of the list is a length-2 base::list with two elements:the first one is a list of coordinates;
the second one is an instantiated scaler class. Choices are MaxAbsScaler, MinMaxScaler, RobustScaler or StandardScaler.
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 <- DiagramScaler$new()
ds$apply(dgm)
ds$fit_transform(list(dgm))
}