cechmate.filtrations.Rips

class cechmate.filtrations.Rips(max_dim=3, verbose=True)[source]

Construct a Rips filtration and the associated diagrams.

Examples

>>> r = Rips(max_dim=3)
>>> simplices = r.build(X)
>>> diagrams = r.diagrams(simplices)
__init__(max_dim=3, verbose=True)

Default constructor

Parameters:
  • max_dim (int) – Maximum dimension of simplices returned in constructed filtration.
  • verbose (boolean) – If True, then print logging statements.

Methods

__init__([max_dim, verbose]) Default constructor
build(X) Compute the rips filtration of a Euclidean point set.
diagrams([simplices, show_inf]) Compute persistence diagrams for the simplices.
build(X)[source]

Compute the rips filtration of a Euclidean point set.

Parameters:X (An Nxd array) – An Nxd array of N Euclidean vectors in d dimensions.
Returns:simplices (list of tuples) – List of simplices with birth time representing Rips filtration for the data X.
diagrams(simplices=None, show_inf=False)

Compute persistence diagrams for the simplices.

Parameters:
  • simplices – simplices or filtration built from build method.
  • show_inf (Boolean) – Determines whether or not to return points that never die.
Returns:

dgms (list of diagrams) – the persistence diagram for Hk