Metadata-Version: 2.1
Name: perscode
Version: 0.0.1
Summary: Representation of persistence diagrams using persistence codebooks
Home-page: https://github.com/chronchi/perscode
Author: Carlos Ronchi and Lun Zhang
Author-email: carloshvronchi@gmail.com
License: MIT
Keywords: persistent homology,persistence codebooks,persistence diagrams,topological
                  data analysis,algebraic topology
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Intended Audience :: Healthcare Industry
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Description-Content-Type: text/markdown
Requires-Dist: scikit-learn
Requires-Dist: numpy

perscode
===

Vectorization methods for persistence diagrams based in the paper [Persistence Codebooks for
Topological Data Analysis](https://arxiv.org/abs/1802.04852).

## Usage

```python
import perscode
import numpy as np

# generate diagrams
diagrams = [np.random.rand(100,2) for _ in range(20)]
for diagram in diagrams:
    diagram[:,1] += diagram[:,0]

# N is the size of the vectors
# normalize is a Bool to whether or not normalize the output vector
pbow = perscode.PBoW(N = 3, normalize = False)
wpbow = perscode.wPBoW(N = 3)
# n_subsample is an int or None. If none all points will be used when calculating GMMs.
spbow = perscode.sPBoW(N = 10, n_subsample = None)

# vectorize diagrams
pbow_diagrams  = pbow.transform(diagrams)
wpbow_diagrams = wpbow.transform(diagrams)
spbow_diagrams = spbow.transform(diagrams)

# for PVLAD and stable PVLAD
pvlad = perscode.PVLAD(N = 3)
spvlad = perscode.sPVLAD(N = 3)

pvlad_diagrams = pvlad.transform(diagrams)
spvlad_diagrams = spvlad.transform(diagrams)
```

## TODO
- [x] Implement options to pass cluster centers as arguments in wPBoW and sPBoW.
- [x] Implement PVLAD
- [x] Implement sPVLAD
- [ ] Implement PFV
- [x] Implement optional weighted subsampling to wPBoW, sPBoW, sPVLAD classes.


