vietoris_rips_filtration#

vietoris_rips_filtration(domain, population=None, include_boundaries=None, exclude_boundaries=None, boundary_exclude_distance=0, max_dimension=1, max_distance=inf, distance_metric='euclidean', visualise_output=False, visualise_peristence_diagram_kwargs={})#

Compute the Vietoris-Rips filtration for a given domain. Given a set of points in a metric space and a distance threshold ϵ, the Vietoris-Rips complex is a simplicial complex. It is built by including a k-simplex (e.g., a triangle or higher-dimensional counterpart) whenever the distance between any two points in the k-simplex is less than or equal to ϵ. As ϵ increases from 0, new simplices are added, creating a nested sequence of simplicial complexes called a filtration. This helps track the appearance and disappearance of topological features (such as connected components, loops, or voids) at different scales.

Parameters:
domainobject

A muspan domain object.

populationquery-like, optional

A query, list/tuple of indices, or a single int specifying the objects to consider. Defaults to None.

include_boundariesarray-like, query-like, or None, optional

Boundaries to include in the analysis. Defaults to None.

exclude_boundariesarray-like, query-like, or None, optional

Boundaries to exclude from the analysis. Defaults to None.

boundary_exclude_distancefloat, optional

Buffer to exclude objects located within boundary_exclude_distance from the boundaries. Defaults to 0.

max_dimensionint, optional

The maximum dimension of the simplices to be considered in the filtration. Default is 1.

max_distancefloat, optional

The maximum distance up to which simplices are considered. Default is np.inf.

distance_metricstr, optional

The metric used to compute distances between objects. Default is ‘euclidean’.

visualise_outputbool, optional

If True, visualise the persistence diagram. Default is False.

visualise_peristence_diagram_kwargsdict, optional

Additional keyword arguments to pass to the persistence_diagram function when visualising the persistence diagram.

Returns:
dict

A dictionary containing the persistent features computed by the ripser library.

Raises:
ValueError

If the query provided is not of the correct type.

Notes

This function uses the Ripser library to compute the persistent homology of the Vietoris-Rips filtration. The distance matrix is computed using the specified distance metric, and then passed to Ripser.