Skip to main content

Python implementation persistent images representation of persistence diagrams.

Project description

[![Build Status](](
[![License: MIT](](

# Persim <img align="right" width="40" height="40" src="">

Persim is a Python implementation of Persistence Images as first introduced in [](

It is designed to interface with [Ripser](, though any persistence diagram should work fine.

# Setup

Currently, the only option is to install the library from source:

pip install persim

# Usage

First, construct a diagram. In this example, we will use [Ripser](

``` Python
import numpy as np
from ripser import Rips

data = np.random.random((100,2))
rips = Rips()
dgm = rips.fit_transform(data)
diagram = dgm[1] # Just diagram for H1

Then from this diagram, we construct the persistence image

``` Python
from persim import PersImage

pim = PersImage(diagram)
img = pim.transform()


- The API needs a little work, not quite sklearn compliant. Please do offer any suggestions.
- Implement more varieties of weighting and kernel functions.
- Build tests.

Project details

Download files

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

Files for persim, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size persim-0.0.2-py3-none-any.whl (3.8 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size persim-0.0.2.tar.gz (3.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page