This is a class or removing points that are close or far from the diagonal in persistence diagrams. If persistence diagrams are 2-column tibble::tibbles (i.e. persistence diagrams with ordinary features), points are ordered and thresholded by distance-to-diagonal. If persistence diagrams are 1-column tibble::tibbles (i.e. persistence diagrams with essential features), points are not ordered and thresholded by first coordinate.
Super classes
rgudhi::PythonClass
-> rgudhi::SKLearnClass
-> rgudhi::PreprocessingStep
-> ProminentPoints
Methods
Inherited methods
Method new()
The ProminentPoints
constructor.
Usage
ProminentPoints$new(
use = FALSE,
num_pts = 10,
threshold = -1,
location = c("upper", "lower")
)
Arguments
use
A boolean value specifying whether to use the class. Defaults to
FALSE
.num_pts
An integer value specifying the cardinality threshold. Defaults to
10L
. Iflocation == "upper"
, keeps the topnum_pts
points that are the farthest away from the diagonal. Iflocation == "lower"
, keeps the topnum_pts
points that are the closest to the diagonal.threshold
A numeric value specifying the distance-to-diagonal threshold. Defaults to
-1.0
. Iflocation == "upper"
, keeps the points that are at least at a distance threshold from the diagonal. Iflocation == "lower"
, keeps the points that are at most at a distance threshold from the diagonal.location
A string specifying whether to keep the points that are far away (
"upper"
) or close ("lower"
) to the diagonal. Defaults to"upper"
.
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)
pp <- ProminentPoints$new()
pp$apply(dgm)
pp$fit_transform(list(dgm))
}