| PersistenceImage | R Documentation |
Computes persistence images from a list of persistence diagrams. A persistence image is a 2D function computed from a persistence diagram by convolving the diagram points with a weighted Gaussian kernel. The plane is then discretized into an image with pixels, which is flattened and returned as a vector. See http://jmlr.org/papers/v18/16-337.html for more details.
rgudhi::PythonClass -> rgudhi::SKLearnClass -> rgudhi::VectorRepresentationStep -> PersistenceImage
rgudhi::PythonClass$get_python_class()rgudhi::PythonClass$set_python_class()rgudhi::SKLearnClass$get_params()rgudhi::SKLearnClass$set_params()rgudhi::VectorRepresentationStep$apply()rgudhi::VectorRepresentationStep$fit()rgudhi::VectorRepresentationStep$fit_transform()rgudhi::VectorRepresentationStep$transform()new()The PersistenceImage constructor.
PersistenceImage$new( bandwidth = 1, weight = ~1, resolution = c(20, 20), im_range = rep(NA_real_, 4) )
bandwidthA numeric value specifying the bandwidth of the Gaussian
kernel. Defaults to 1.0.
weightA function or a formula coercible into a function via
rlang::as_function() specifying the weight function for the
persistence diagram points. Defaults to the constant function ~ 1.
This function must be defined on 2D points, i.e. lists or arrays of the
form [p_x,p_y].
resolutionAn length-1 integer vector specifying the size (in
pixels) of the persistence image. Defaults to rep(20L, 2).
im_rangeA length-4 numeric vector specifying the two-dimensional
domain for the persistence image, of the form [x_{\min}, y_{\min},
x_{\max}, y_{\max}]. Defaults to rep(NA, 4). If one of the values is
NA, it can be computed from the persistence diagrams with the
$fit() method.
An object of class PersistenceImage.
clone()The objects of this class are cloneable with this method.
PersistenceImage$clone(deep = FALSE)
deepWhether to make a deep clone.
Mathieu Carrière
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)
pei <- PersistenceImage$new()
pei$apply(dgm)
pei$fit_transform(list(dgm))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.