vectorise_persistence#
- vectorise_persistence(feature_persistence, method='statistics')#
Vectorise feature peristences.
- Parameters:
- feature_persistencedict
A dictionary containing persistence diagrams. The key ‘dgms’ should map to a list of arrays, where each array corresponds to a homology dimension and contains pairs of birth and death times.
- methodstr, optional
The method to use for vectorising the persistence diagram. Defaults to ‘statistics’. Currently, only ‘statistics’ is implemented.
- Returns:
- vectorised_persistencenumpy.ndarray
A vectorised representation of the persistence diagram. The length and content of the vector depend on the chosen method.
- feature_namelist
A list of the statistics corresponding to each entry of the returned vector
- Raises:
- ValueError
If the specified method is not implemented.
Notes
Implements vectorisation methods reviewed in https://arxiv.org/pdf/2212.09703
- The ‘statistics’ method calculates the following statistics for each homology dimension:
Number of points in the diagram
Mean, std, 10th, 25th, 50th, 75th, and 90th percentiles of the birth, death, persistence and bar midpoint values
Entropy of the diagram
The vectorised representation is a concatenation of these statistics for all homology dimensions.