Package: permaviss
PerMaVissWelcome to PerMaViss! This is a Python3 implementation of the Persistence Mayer Vietoris spectral sequence.
For full documentation, visitthis page.
For a mathematical description of the procedure, seeDistributing Persistent Homology via Spectral Sequences.In a nutshell, this library is intended to be aproof of conceptfor persistence homology parallelization. That is, one can divide a point cloud into covering regions, compute persistent homology on each part, and combine all results to obtain the global persistent homology again. This is done by means of the Persistence Mayer Vietoris spectral sequence. Here we present two examples, the torus and random point clouds in three dimensions. Both of these are divided into8mutually overlapping regions, and the spectral sequence is computed with respect to this cover. The resulting barcodes coincide with that which would be obtained by computing persistent homology directly.This implementation is more of aprototypethan a finished program. As such, it still needs to be optimized. Also, it would be great to have more examples for different covers. Additionally, it would be interesting to also have an implementation for cubical, alpha, and other complexes. Any collaboration or suggestion will be welcome!DependenciesPerMaViss requires:Python3NumPyScipyOptional for examples and notebooks:Matplotlibmpl_toolkitsInstallationPermaviss is built on Python 3, and relies only onNumPyandScipy.Additionally,Matplotlibandmpl_toolkitsare used for the tutorials.To install usingpip3:$ pip3 install permavissIf you prefer to install from source, clone from GitHub repository:$ git clone https://github.com/atorras1618/PerMaViss
$ cd PerMaViss
$ pip3 install -e .QuickstartThe main function which we use ispermaviss.spectral_sequence.MV_spectral_seq.create_MV_ss.
We start by taking 100 points in a noisy circle of radius 1>>> from permaviss.sample_point_clouds.examples import random_circle
>>> point_cloud = random_circle(100, 1, epsilon=0.2)Now we set the parameters for spectral sequence. These area prime numberp,the maximum dimension of the Rips Complexmax_dim,the maximum radius of filtrationmax_r,the number of divisionsmax_divalong the maximum range inpoint_cloud,and theoverlapbetween different covering regions.In our case, we set the parameters to cover our circle with 9 covering regions.
Notice that  in order for the algorithm to give the correct result we needoverlap > max_r.>>> p = 3
>>> max_dim = 3
>>> max_r = 0.2
>>> max_div = 3
>>> overlap = max_r * 1.01Then, we compute the spectral sequence, notice that the method prints the successive page ranks.>>> from permaviss.spectral_sequence.MV_spectral_seq import create_MV_ss
>>> MV_ss = create_MV_ss(point_cloud, max_r, max_dim, max_div, overlap, p)
PAGE: 1
[[  0   0   0   0   0]
 [  7   0   0   0   0]
 [133  33   0   0   0]]
PAGE: 2
[[  0   0   0   0   0]
 [  7   0   0   0   0]
 [100   0   0   0   0]]
PAGE: 3
[[  0   0   0   0   0]
 [  7   0   0   0   0]
 [100   0   0   0   0]]
PAGE: 4
[[  0   0   0   0   0]
 [  7   0   0   0   0]
 [100   0   0   0   0]]We can inspect the obtained barcodes on the 1st dimension.>>> MV_ss.persistent_homology[1].barcode
array([[ 0.08218822,  0.09287436],
       [ 0.0874977 ,  0.11781674],
       [ 0.10459203,  0.12520266],
       [ 0.14999507,  0.18220508],
       [ 0.15036084,  0.15760192],
       [ 0.16260913,  0.1695936 ],
       [ 0.16462541,  0.16942819]])Notice that in this case, there was no need to solve the extension problem. See the examples folder for nontrivial extensions.DISCLAIMERThe main purpose of this library is to explore how the Persistent Mayer Vietoris spectral sequence can be used for computing persistent homology.This does not pretend to be an optimal library. Also, it does not parallelize the computations of persistent homology after the first page. Thus, this is slower than most other persistent homology computations.This library is still on development and is still highly undertested. If you notice any issues, please email
TorrasCasasA@cardiff.ac.ukThis library is published under the standard MIT licence. Thus:
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.How to citeÁlvaro Torras Casas. (2020, January 20). PerMaViss: Persistence Mayer Vietoris spectral sequence (Version v0.0.2). Zenodo.http://doi.org/10.5281/zenodo.3613870ReferenceThis module is written using the algorithm inDistributing Persistent Homology via Spectral Sequences.