PHom() creates instances of PHom objects, which are convenient containers for persistence data. Generally, data frame (or similar) objects are used to create PHom instances with users specifying which columns contain dimension, birth, and death details for each feature.

PHom(x, dim_col = 1, birth_col = 2, death_col = 3)

Arguments

x

object used to create PHom instance

dim_col

either integer representing column index for feature dimension data or character representing column name

birth_col

either integer representing column index for feature birth data or character representing column name

death_col

either integer representing column index for feature death data or character representing column name

Value

PHom instance

Examples

# construct data frame with valid persistence data df <- data.frame(dimension = c(0, 0, 1, 1, 1, 2), birth = rnorm(6), death = rnorm(6, mean = 15)) # create `PHom` instance and print df_phom <- PHom(df) df_phom
#> PHom object containing persistence data for 6 features. #> #> Contains: #> * 2 0-dim features #> * 3 1-dim features #> * 1 2-dim feature #> #> Radius/diameter: min = -2.4373; max = 15.629.
# print feature details to confirm accuracy print.data.frame(df_phom)
#> dimension birth death #> 1 0 -1.400043517 13.17818 #> 2 0 0.255317055 14.75267 #> 3 1 -2.437263611 14.75580 #> 4 1 -0.005571287 14.71729 #> 5 1 0.621552721 14.44630 #> 6 2 1.148411606 15.62898