# Empowering Advanced Parametric Modes Clustering from Topological Data Analysis
## 2 Methods
### On the Surface Topology
#### 2.2.3 Persistence Diagrams  
In order to have a more exhaustive view on how the features are changing across different scales, the appearance and disappearance of each feature within the filtration are tracked and coded into the _Homology Groups_\(H_{k}(\mathbb{M})\), where \(k=0,1,2,3\) is the homology dimension.  
The elements of a _Homology Group_\(H_{k}(\mathbb{M})\) are classes of chains of simplices (\"packets\") \(\sigma\in S_{k}(\mathbb{M})\), that is, simplices sharing faces, edges, or vertices. It can be seen as a connected component of the intersection of \(\mathbb{M}\) with a \(k\)-dimensional linear subspace of \(\mathbb{R}^{3}\). The use of _Homology Groups_ allows for performing algebraic operations over their elements.  
Given a _Homology Group_, we can now define how to track the appearance of the features across different scales, by defining the _Homology Group at a scale_\(\alpha\), \(H_{k}^{\alpha}(\mathbb{M})\). It represents the classes of simplices as described previously, but taken from \(S_{k}^{\alpha}(\mathbb{M})\). That is, the elements of \(S_{k}(\mathbb{M})\) with a filtration value lesser that \(\alpha\).  
This approach is known as the _Persistent Homology_. It allows for quantifying the appearance and disappearance of the features across the different scales and dimensions:  
* The birth scale \(b_{\gamma}\) of the feature \(\gamma\) at homology \(k\) \[b_{\gamma}=\min_{0\leq j\leq m}\{\alpha_{j}:\gamma\in H_{k}^{a_{j}}\}\]
* The death scale \(d_{\gamma}\) of the feature \(\gamma\) at homology \(k\) \[d_{\gamma}=\max_{0\leq j\leq m}\{\alpha_{j}:\gamma\in H_{k}^{a_{j}}\}\]  
The birth scale represents the value at which the feature appeared in the filtration by combining lower dimensional simplices to form it. Conversely, the death scale represents the value at which the feature disappeared in the filtration by being combined into a higher dimensional feature. For example, if a vertex is part of a segment, then the death scale of the vertex is exactly the birth scale of the associated segment.  
Note that, by definition, vertices always have a zero birth scale, while tetrahedrons always have an infinite death scale (in the numerical results, we removed the infinite values for computation purposes). Given that our data points \(\mathbb{M}\) are embedded in \(\mathbb{R}^{3}\), we will only track up to the dimension-2 features, thus the definition of \(S(\mathbb{M})\) with \(k=0,1,2\). More generally, if the data points are embedded in a \(d\)-dimensional manifold, the persistent homology can be computed up to dimension \(d-1\).  
Finally, the persistence of the features throughout the scales can be represented by the so-called _Persistence Diagram_ of \(\mathbb{M}\), defined at dimension-\(k\) from  
\[\mathcal{PD}_{k}(\mathbb{M})=\{(b_{\gamma},d_{\gamma}):\gamma\in H_{k}\},\]  
where \(b_{\gamma}\) and \(d_{\gamma}\) are the birth and death scales of a feature \(\gamma\) at homology \(k\).  
The surface \(\mathbb{M}\) persistence diagrams \(\mathcal{PD}(\mathbb{M})\) read  
\[\mathcal{PD}(\mathbb{M})=\{\mathcal{PD}_{0}(\mathbb{M}),\mathcal{PD}_{1}( \mathbb{M}),\mathcal{PD}_{2}(\mathbb{M})\}.\]