cubical {ripserr} | R Documentation |
Calculate Persistent Homology using a Cubical Complex
Description
Calculates the persistent homology of a 2- to 4-dimensional numeric array using a Cubical complex. This function is an R wrapper for Takeki Sudo and Kazushi Ahara's Cubical Ripser C++ library. For more information on the C++ library, see https://github.com/CubicalRipser.
Usage
cubical(
dataset,
threshold = 9999,
method = 0,
standardize = FALSE,
return_format = "df"
)
Arguments
dataset |
numeric array containing pixel/voxel data |
threshold |
maximum diameter for computation of Cubical complex |
method |
defaults to 0 for link join; alternatively, can be 1 for compute pairs. See original Cubical Ripser code at GitHub user CubicalRipser for details. |
standardize |
boolean determining whether point cloud size should be standardized |
return_format |
defaults to |
Value
3-column matrix with each row representing a TDA feature
Examples
# 2-dim example
dataset <- rnorm(10 ^ 2)
dim(dataset) <- rep(10, 2)
cubical_hom2 <- cubical(dataset)
# 3-dim example
dataset <- rnorm(8 ^ 3)
dim(dataset) <- rep(8, 3)
cubical_hom3 <- cubical(dataset)
# 4-dim example
dataset <- rnorm(5 ^ 4)
dim(dataset) <- rep(5, 4)
cubical_hom4 <- cubical(dataset)
[Package ripserr version 0.1.1 Index]