Skip to content

Commit fe5af88

Browse files
authored
Merge pull request #48 from catanzaromj/master
Implement Persistence Landscapes
2 parents 822c9ca + a94b328 commit fe5af88

18 files changed

+3377
-9
lines changed

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
include *.txt
22
include *.md
3+
include persim/landscapes/*

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
Persim is a Python package for many tools used in analyzing Persistence Diagrams. It currently houses implementations of
1313

1414
- Persistence Images
15+
- Persistence Landscapes
1516
- Bottleneck distance
1617
- Modified Gromov–Hausdorff distance
1718
- Sliced Wasserstein Kernel

RELEASE.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
0.3.0
2+
- Add implementations of Persistence Landscapes, including plotting methods, a transformer, and additional notebooks.
3+
14
0.2.1
25
- Allowed for more than 9 diagram labels in plot_persistence_diagrams.
36

docs/index.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
|PyPI version| |Downloads| |Build Status| |Codecov| |License: MIT|
22

3-
Persim is a Python package for many tools used in analyzing Persistence Diagrams. It currently houses implementations of
3+
Persim is a Python package for many tools used in analyzing Persistence Diagrams. It currently includes implementations of most of the popular methods of working with persistence diagrams, including
44

55
- Persistence Images
6+
- Persistence Landscapes
67
- Bottleneck distance
78
- Modified Gromov--Hausdorff distance
89
- Sliced Wasserstein Kernel
@@ -26,11 +27,11 @@ We welcome contributions of all shapes and sizes. There are lots of opportunitie
2627

2728
To contribute please fork the project make your changes and submit a pull request. We will do our best to work through any issues with you and get your code merged into the main branch.
2829

29-
30+
Documentation
31+
--------------
3032

3133
.. toctree::
3234
:maxdepth: 1
33-
:hidden:
3435
:caption: User Guide
3536

3637
notebooks/Persistence images
@@ -40,11 +41,12 @@ To contribute please fork the project make your changes and submit a pull reques
4041

4142
.. toctree::
4243
:maxdepth: 1
43-
:hidden:
4444
:caption: Tutorials
4545

4646
notebooks/Classification with persistence images
4747
notebooks/Persistence barcode measure
48+
notebooks/Differentiation with Persistence Landscapes
49+
notebooks/Persistence Landscapes and Machine Learning
4850

4951

5052
.. |Downloads| image:: https://pypip.in/download/persim/badge.svg

docs/notebooks/Differentiation with Persistence Landscapes.ipynb

Lines changed: 378 additions & 0 deletions
Large diffs are not rendered by default.

docs/notebooks/Persistence Landscapes and Machine Learning.ipynb

Lines changed: 731 additions & 0 deletions
Large diffs are not rendered by default.

docs/reference/index.rst

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,26 @@ Persistence Images
2727
persim.PersistenceImager
2828
persim.PersImage
2929

30+
Persistence Landscapes
31+
========================
32+
.. autosummary::
33+
:toctree: stubs
34+
:recursive:
35+
:nosignatures:
36+
37+
persim.PersLandscapeExact
38+
persim.PersLandscapeApprox
39+
persim.PersistenceLandscaper
40+
41+
.. autosummary::
42+
:toctree: stubs
43+
:recursive:
44+
:nosignatures:
3045

46+
persim.average_approx
47+
persim.snap_PL
48+
persim.plot_landscape
49+
persim.plot_landscape_simple
3150

3251

3352
Diagram Visualization
@@ -40,8 +59,8 @@ Diagram Visualization
4059
persim.plot_diagrams
4160
persim.bottleneck_matching
4261
persim.wasserstein_matching
43-
44-
62+
persim.plot_landscape
63+
persim.plot_landscape_simple
4564

4665

4766
Persistence barcode measure

persim/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.2.1"
1+
__version__ = "0.3.0"

persim/landscapes/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from .exact import PersLandscapeExact
2+
from .approximate import PersLandscapeApprox
3+
from .transformer import PersistenceLandscaper
4+
from .visuals import plot_landscape, plot_landscape_simple
5+
from .tools import *

0 commit comments

Comments
 (0)