sixpack#
Overview#
Routines for computing 6packs of persistence diagrams.
Functions#
Compute the 6pack of persistence diagrams of a coloured pointcloud. 

Compute the 6pack of persistence diagrams associated to a filtered simplicial complex with coloured vertices. 

Load a 6pack of persistence diagrams from a HDF5 file or group. 

Save a 6pack of persistence diagrams to a HDF5 file or group. 
Classes#
6pack of persistence diagrams. 

Persistence diagram object, represented by a list of simplex pairings and a list of unpaired simplices. 
Details#
 compute(x, colours, dom=None, k=None, method='chromatic alpha', max_diagram_dimension=2, tolerance=0)#
Compute the 6pack of persistence diagrams of a coloured pointcloud.
This function constructs a filtered simplicial complex \(K\) from the point cloud, and computes the 6pack of persistence diagrams associated with the inclusion \(f : L \hookrightarrow K\) where \(L\) is some filtered subcomplex of \(K\).
 Parameters:
x (ndarray) – Numpy matrix whose columns are points.
colours (Sequence[int]) – Sequence of integers describing the colours of the points.
dom (Collection[int]  int  None) – Integer or collection of integers describing the colours of the points in the domain (the subcomplex \(L\)).
k (int  None) – If not
None
, then the domain is taken to be the \(k\)chromatic subcomplex of \(K\), i.e., the subcomplex of simplices having at most \(k\) colours.method (str) – Filtration used to construct the chromatic complex. Must be one of
['chromatic alpha', 'chromatic delcech', 'chromatic delrips']
.max_diagram_dimension (int) – Maximum homological dimension for which the persistence diagrams are computed.
tolerance (float) – Retain only points with persistence strictly greater than this value.
 Return type:
 Returns :
Diagrams corresponding to the following persistence modules (where \(H_*\) is the persistent homology functor and \(f_*\) is the induced map on persistent homology):
\(H_*(L)\) (domain)
\(H_*(K)\) (codomain)
\(\ker(f_*)\) (kernel)
\(\mathrm{coker}(f_*)\) (cokernel)
\(\mathrm{im}(f_*)\) (image)
\(H_*(K, L)\) (relative homology)
Each diagram is represented by lists of paired and unpaired simplices, and contains simplices of all dimensions.
dgms
also contains the entrance times of the simplices and their dimensions.
 from_filtration(K, dom=None, k=None, max_diagram_dimension=2, tolerance=0)#
Compute the 6pack of persistence diagrams associated to a filtered simplicial complex with coloured vertices.
Given a filtered chromatic simplicial complex \(K\) and a subcomplex \(L\) of \(K\), this function computes the 6pack of persistence diagram associated with the inclusion map \(f : L \hookrightarrow K\). The subcomplex is specified by the colours of its vertices, or by an integer \(k\) wherein all simplices with \(k\) or fewer colours are considered part of the subcomplex.
 Parameters:
K (FilteredComplex) – A filtered chromatic simplicial complex.
dom (Collection[int]  int  None) – Integer or collection of integers describing the colours of the points in the domain (the subcomplex \(L\)).
k (int  None) – If not
None
, then the domain is taken to be the \(k\)chromatic subcomplex of \(K\), i.e., the subcomplex of simplices having at most \(k\) colours.max_diagram_dimension (int) – Maximum homological dimension for which the persistence diagrams are computed.
tolerance (float) – Retain only points with persistence strictly greater than this value.
 Returns:
\(H_*(L)\) (domain)
\(H_*(K)\) (codomain)
\(\ker(f_*)\) (kernel)
\(\mathrm{coker}(f_*)\) (cokernel)
\(\mathrm{im}(f_*)\) (image)
\(H_*(K, L)\) (relative homology)
Each diagram is represented by sets of paired and unpaired simplices, and contain simplices of all dimensions.
dgms
also contains the entrance times of the simplices and their dimensions. Return type:
Diagrams corresponding to the following persistence modules (where \(H_*\) is the persistent homology functor and \(f_*\) is the induced map on persistent homology)
 load_diagrams(file)#
Load a 6pack of persistence diagrams from a HDF5 file or group.
 Return type:
 save_diagrams(dgms, file)#
Save a 6pack of persistence diagrams to a HDF5 file or group.
 Parameters:
dgms (DiagramEnsemble) – 6pack of diagrams to save to file/group.
file (Group) – A h5py file or group.