View source: R/vietoris_rips.R
vietoris_rips | R Documentation |
This function is an R wrapper for the Ripser C++ library to calculate
persistent homology. For more information on the C++ library, see
https://github.com/Ripser/ripser. For more information on how objects of
different classes are evaluated by vietoris_rips
, read the Details section
below.
vietoris_rips(dataset, ...) ## S3 method for class 'data.frame' vietoris_rips(dataset, ...) ## S3 method for class 'matrix' vietoris_rips(dataset, max_dim = 1L, threshold = -1, p = 2L, ...) ## S3 method for class 'dist' vietoris_rips(dataset, max_dim = 1L, threshold = -1, p = 2L, ...) ## S3 method for class 'numeric' vietoris_rips( dataset, data_dim = 2L, dim_lag = 1L, sample_lag = 1L, method = "qa", ... ) ## S3 method for class 'ts' vietoris_rips(dataset, ...) ## Default S3 method: vietoris_rips(dataset, ...)
dataset |
object on which to calculate persistent homology |
... |
other relevant parameters |
max_dim |
maximum dimension of persistent homology features to be calculated |
threshold |
maximum simplicial complex diameter to explore |
p |
prime field in which to calculate persistent homology |
data_dim |
desired end data dimension |
dim_lag |
time series lag factor between dimensions |
sample_lag |
time series lag factor between samples (rows) |
method |
currently only allows |
vietoris_rips.data.frame
assumes dataset
is a point cloud, with each row
representing a point and each column representing a dimension.
vietoris_rips.matrix
currently assumes dataset
is a point cloud (similar
to vietoris_rips.data.frame
). Currently in the process of adding network
representation to this method.
vietoris_rips.dist
takes a dist
object and calculates persistent homology
based on pairwise distances. The dist
object could have been calculated
from a point cloud, network, or any object containing elements from a finite
metric space.
vietoris_rips.numeric
and vietoris_rips.ts
both calculate persistent
homology of a time series object. The time series object is converted to a
matrix using the quasi-attractor method detailed in Umeda (2017)
doi:10.1527/tjsai.D-G72. Persistent homology of the resulting matrix is
then calculated.
PHom
object
# create a 2-d point cloud of a circle (100 points) num.pts <- 100 rand.angle <- runif(num.pts, 0, 2*pi) pt.cloud <- cbind(cos(rand.angle), sin(rand.angle)) # calculate persistent homology (num.pts by 3 numeric matrix) pers.hom <- vietoris_rips(pt.cloud)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.