Interpreting the phom R package - persistent homology - topological analysis of data - Cluster analysis

StackOverflow https://stackoverflow.com/questions/22703475

  •  23-06-2023
  •  | 
  •  

Pregunta

I am learning to analyze the topology of data with the pHom package of R.

I would like to understand (characterize) a set of data (A Matrix(3500 rows,10 colums). In order to achieve such aim the R-package phom runs a persistent homology test that describes the data.

(Reference: The following video describes what we are seeking to do with homology in topology - reference video 4 min: http://www.youtube.com/embed/XfWibrh6stw?rel=0&autoplay=1).

Using the R-package "phom" (link: http://cran.r-project.org/web/packages/phom/phom.pdf) the following example can be run.

I need help in order to properly understand how the phom function works and how to interpret the data (plot).

Using the Example # 1 of the reference manual of the phom package in r, running it on R

Load Packages

library(phom)
library(Rccp)

Example 1

x <- runif(100)
y <- runif(100)
points <- t(as.matrix(rbind(x, y)))
max_dim <- 2
max_f <- 0.2
intervals <- pHom(points, max_dim, max_f, metric="manhattan")
plotPersistenceDiagram(intervals, max_dim, max_f,
title="Random Points in Cube with l_1 Norm")

I would kindly appreciate if someone would be able to help me with:

Question: a.) what does the value max_f means and where does it come from? from my data? I set them? b.) the plot : plotPersistenceDiagram (if you run the example in R you will see the plot), how do I interpret it?

Thank you.

Note: in order to run the "phom" package you need the "Rccp" package and you need the latest version of R 3.03.

The previous example was done in R after loading the "phom" and the "Rccp" packages respectively.

¿Fue útil?

Solución

This is totally the wrong venue for this question, but just in case you're still struggling with it a year later I happen to know the answer.

Computing persistent homology has two steps:

  1. Turn the point cloud into a filtration of simplicial complexes
  2. Compute the homology of the simplicial complex

The "filtration" part of step 1 means you have to compute a simplicial complex for a whole range of parameters. The parameter in this case is epsilon, the distance threshold within which points are connected. The max_f variable caps the range of epsilon sweep from zero to max_f.

plotPersistenceDiagram displays the homological "persistence barcodes" as points instead of lines. The x-coordinate of the point is the birth time of that topological feature (the value of epsilon for which it first appears), and the y-coordinate is the death time (the value of epsilon for which it disappears).

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top