permaviss.spectral_sequence.MV_spectral_seq

This module implements the Mayer-Vietoris spectral sequence management.

Functions

create_MV_ss(point_cloud, max_r, max_dim, …) This function creates a Mayer Vietoris spectral sequence with the given parameters.
local_persistent_homology(nerve_point_cloud, …) This function computes the Vietoris Rips complex and persistent homology of a covering region.
permaviss.spectral_sequence.MV_spectral_seq.create_MV_ss(point_cloud, max_r, max_dim, max_div, overlap, p)[source]

This function creates a Mayer Vietoris spectral sequence with the given parameters. The procedure has four main steps:

  1. Obtain a cover and a nerve associated to it.
  2. Compute the persistent homology on each cover, intersections, and so on.
  3. Compute spectral sequence pages until they collapse.
  4. Solve the extension problem
Parameters:
  • point_cloud (Numpy Array) – Coordinates for given points. Each row corresponds to a point.
  • max_r (float) – Maximum radius of persistence.
  • max_dim (int) – Maximum dimension of simplexes in Vietoris-Rips complex.
  • max_div (int) – Number of division hypercubes on the dimension with maximum length on point cloud.
  • overlap (float) – Overlap between adjacent covers.
Returns:

MV_ss

Return type:

spectral_sequence object containing all the information.

Example

>>> from permaviss.sample_point_clouds.examples import random_cube,
... take_sample
>>> X = random_cube(1000,3)
>>> point_cloud = take_sample(X,130)
>>> max_r = 0.36
>>> max_dim = 3
>>> p = 3
>>> max_div = 2
>>> overlap = max_r*1.01
>>> MV_ss = create_MV_ss(point_cloud, max_r, max_dim, max_div, overlap,
... p)
PAGE: 1
[[ 25   7   4   1   0   0   0   0   0]
 [160 118 128 144 112  56  16   2   0]
 [310 380 436 445 336 168  48   6   0]]
PAGE: 2
[[ 21   0   0   0   0   0   0   0   0]
 [ 98   2   0   0   0   0   0   0   0]
 [131   5   1   0   0   0   0   0   0]]
PAGE: 3
[[ 21   0   0   0   0   0   0   0   0]
 [ 97   2   0   0   0   0   0   0   0]
 [131   5   0   0   0   0   0   0   0]]
PAGE: 4
[[ 21   0   0   0   0   0   0   0   0]
 [ 97   2   0   0   0   0   0   0   0]
 [131   5   0   0   0   0   0   0   0]]
>>> print(MV_ss.persistent_homology[0].dim)
131
>>> print(MV_ss.persistent_homology[1].dim)
97
>>> print(MV_ss.persistent_homology[2].dim)
21
permaviss.spectral_sequence.MV_spectral_seq.local_persistent_homology(nerve_point_cloud, max_r, max_dim, p, n_dim, spx_idx)[source]

This function computes the Vietoris Rips complex and persistent homology of a covering region.

It is meant to be run in parallel.

Parameters:
  • nerve_point_cloud (list(list(Numpy Array))) – Local point cloud coordinates indexed by nerve. The first entry contains a list of the point cloud coordinates for each covering region. The second entry contains a list of the point cloud coordinates for each double intersection of covering regions. And so on.
  • points_IN (list(list(Numpy Array))) – Local Identification Numbers (IN) indexed by nerve. That is, this is the same as nerve_point_cloud, but containing IN instead of coordinates for each point.
  • max_r (float) – Maximum radius for computing persistent homology.
  • max_dim (int) – Maximum dimension for complexes
  • n_dim (int) – Current dimension in Nerve of cover
  • spx_idx (int) – Index of n_dim simplex of the covering nerve.
Returns: