Skip to main content

Implementation of Minibox and Delauany edges algorithms.

Project description

persty - Minibox and Delaunay Edges Algorithms

This package provides an implementation of algorithms for finding the Minibox and Delaunay edges on a finite set of points in d-dimensional space with Chebysehv distance.

Installation

This package requires setuptools and numpy.

To use the functionality of the persty.util submodule also gudhi needs to be installed. See Computing Persistent Homology section below.

Install it with

>>> pip install git+https://github.com/gbeltramo/persty.git

Usage

import numpy as np
import persty.minibox
import persty.delaunay

np.random.seed(0)
points = np.random.rand(20, 2).tolist()

minibox_edges = persty.minibox.edges(points)
delaunay_edges = persty.delaunay.edges(points)

Computing Persistent Homology

Minibox and Delaunay edges can be used to compute persistent homology in homological dimensions zero and one.

The pesty package provides a wrapper function to generate a gudhi.SimplexTree() object that can be used to compute persistence diagrams of Minibox and Alpha Clique filtrations.

The gudhi package must be installed. If you installed conda this can be obtained by running the following command in a terminal window.

>>> conda install -c conda-forge gudhi

The following code computes the zero and one dimensional persistence diagrams of 1000 randomly sample points in the unit cube in $5$ dimensional space.

import numpy as np
import persty.minibox
import persty.util
from scipy.spatial.distance import chebyshev

np.random.seed(0)
points = np.random.rand(100, 3).tolist()
minibox_edges = persty.minibox.edges(points)
simplex_tree = persty.util.make_gudhi_simplex_tree(points,
                                                   minibox_edges,
                                                   max_simplex_dim=2,
                                                   metric=chebyshev)
persistence_diagrams = simplex_tree.persistence(homology_coeff_field=2,
                                                persistence_dim_max=False)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

persty-0.2.2.tar.gz (9.1 kB view details)

Uploaded Source

Built Distributions

persty-0.2.2-py3.7-win-amd64.egg (20.3 kB view details)

Uploaded Source

persty-0.2.2-cp37-cp37m-win_amd64.whl (29.3 kB view details)

Uploaded CPython 3.7m Windows x86-64

File details

Details for the file persty-0.2.2.tar.gz.

File metadata

  • Download URL: persty-0.2.2.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0.post20200309 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for persty-0.2.2.tar.gz
Algorithm Hash digest
SHA256 3832d634797c03c3433cf0f4f058edfaf2e3b61e2f22a7d8adfc84ab12354f8b
MD5 fdaeaa530b86efb9cd1a846448bcdbed
BLAKE2b-256 3de961d1e62a2227f868b635ccc39c018b19f758bdcd1cd945c1447e6c8913b7

See more details on using hashes here.

File details

Details for the file persty-0.2.2-py3.7-win-amd64.egg.

File metadata

  • Download URL: persty-0.2.2-py3.7-win-amd64.egg
  • Upload date:
  • Size: 20.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0.post20200309 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for persty-0.2.2-py3.7-win-amd64.egg
Algorithm Hash digest
SHA256 84f0f70355a2b8b1c1b59566425c25e32360eacad449f9be70898c59e4d1379d
MD5 af04065152df6c1ba1e4470e5d53aeb9
BLAKE2b-256 c52c42ff43287f70e9886371649aacc649c4e892750691d5afec23a46c6555b0

See more details on using hashes here.

File details

Details for the file persty-0.2.2-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: persty-0.2.2-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 29.3 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0.post20200309 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for persty-0.2.2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 5faedacf4673f272debc6c32a3259f245ad42ddbecff666f1059f71124c0e920
MD5 a5acd0e1054ca0d9b52a31095d6c3dc8
BLAKE2b-256 52c55490b0aa9bd46e0c21973900314b939b208b2df47e96f20adad9b62b6077

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page