Skip to content

Commit 8f5c2ef

Browse files
ulupowreise
andauthored
Prepare for v0.3.0 release (#516)
* Bump version to 0.3.0 * Add release notes * Minor corrections in notebooks Co-authored-by: wreise <[email protected]>
1 parent ef19301 commit 8f5c2ef

9 files changed

+203
-12
lines changed

doc/library.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,5 +114,5 @@ What's new
114114

115115
.. include::
116116
release.rst
117-
:start-after: Release 0.2.2
118-
:end-before: Release 0.2.1
117+
:start-after: Release 0.3.0
118+
:end-before: Release 0.2.2

doc/modules/homology.rst

+6
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ Undirected simplicial homology
2020

2121
Directed simplicial homology
2222
----------------------------
23+
.. currentmodule:: gtda
24+
25+
.. autosummary::
26+
:toctree: generated/homology/
27+
:template: class.rst
28+
2329
homology.FlagserPersistence
2430

2531
Cubical homology

doc/release.rst

+182-1
Large diffs are not rendered by default.

examples/MNIST_classification.ipynb

+3-3
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
"cell_type": "markdown",
9191
"metadata": {},
9292
"source": [
93-
"## Create train and test sets"
93+
"### Create train and test sets"
9494
]
9595
},
9696
{
@@ -149,7 +149,7 @@
149149
"cell_type": "markdown",
150150
"metadata": {},
151151
"source": [
152-
"# Binarize the image"
152+
"### Binarize the image"
153153
]
154154
},
155155
{
@@ -491,7 +491,7 @@
491491
"cell_type": "markdown",
492492
"metadata": {},
493493
"source": [
494-
"### Training a classifier"
494+
"## Training a classifier"
495495
]
496496
},
497497
{

examples/persistent_homology_graphs.ipynb

+6-2
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@
130130
"To understand what these persistence diagrams are telling us about the input weighted graphs, we briefly explain the **clique complex (or flag complex) filtration** procedure underlying the computations in ``VietorisRipsPersistence`` when ``metric=\"precomputed\"``, via an example.\n",
131131
"\n",
132132
"Let us start with a special case of a weighted graph with adjacency matrix as follows:\n",
133+
"\n",
133134
"- the diagonal entries (\"vertex weights\") are all zero;\n",
134135
"- all off-diagonal entries (edge weights) are non-negative;\n",
135136
"- some edge weights are infinite (or very very large).\n",
@@ -141,6 +142,7 @@
141142
"The procedure can be explained as follows: we let a parameter $\\varepsilon$ start at 0, and as we increase it all the way to infinity we keep considering the instantaneous subgraphs made of a) all the vertices in the original graph, and b) those edges whose weight is less than or equal to the current $\\varepsilon$. We also promote these subgraphs to more general structures called **(simplicial) complexes** that, alongside vertices and edges, also possess $k$**-simplices**, i.e. selected subsets of $k + 1$ vertices (a 2-simplex is an abstract \"triangle\", a 3-simplex an abstract \"tetrahedron\", etc). Our criterion is this: for each integer $k \\geq 2$, all $(k + 1)$-cliques in each instantaneous subgraph are declared to be the $k$-simplices of the subgraph's associated complex. By definition, the $0$-simplices are the vertices and the $1$-simplices are the available edges.\n",
142143
"\n",
143144
"As $\\varepsilon$ increases from 0 (included) to infinity, we record the following information:\n",
145+
"\n",
144146
"1. How many new **connected components** are created because of the appearance of vertices (in this example, all vertices \"appear\" in one go at $\\varepsilon = 0$, by definition!), or merge because of the appearance of new edges.\n",
145147
"2. How many new 1-dimensional \"holes\", 2-dimensional \"cavities\", or more generally $d$-dimensional **voids** are created in the instantaneous complex. A hole, cavity, or $d$-dimensional void is such only if there is no collection of \"triangles\", \"tetrahedra\", or $(d + 1)$-simplices which the void is the \"boundary\" of. *Note*: Although the edges of a triangle *alone* \"surround a hole\", these cannot occur in our particular construction because the \"filling\" triangle is also declared present in the complex when all its edges are.\n",
146148
"3. How many $d$-dimensional voids which were present at earlier values of $\\epsilon$ are \"filled\" by $(d + 1)$-simplices which just appear.\n",
@@ -242,6 +244,7 @@
242244
"And just as in the case of weighted graphs, we record the appearance/disappearance of connected components and voids as we keep increasing $r$.\n",
243245
"\n",
244246
"The case of point clouds can actually be thought of as a special case of the case of FCW graphs. Namely, if:\n",
247+
"\n",
245248
"1. we regard each point in the cloud as an abstract vertex in a graph,\n",
246249
"2. we compute the square matrix of pairwise (Euclidean or other) distances between points in the cloud, and\n",
247250
"3. we run the procedure explained above with $\\varepsilon$ defined as $2r$,\n",
@@ -278,8 +281,9 @@
278281
"What if, as is the case in many applications, our graphs have sparse connections and are unweighted?\n",
279282
"\n",
280283
"In ``giotto-tda``, there are two possibilities:\n",
281-
"1. One can encode the graphs as adjacency matrices of non-fully connected weighted graphs, where all weights corresponding to edges which are present are equal to ``1.`` (or any other positive constant). See section ***Non-fully connected weighted graphs*** above for the different encoding conventions for sparse and dense matrices.\n",
282-
"2. One can preprocess the unweighted graph via [GraphGeodesicDistance](https://giotto-ai.github.io/gtda-docs/latest/modules/generated/graphs/processing/gtda.graphs.GraphGeodesicDistance.html) to obtain a FCW graph where edge $ij$ has as weight the length of the shortest path from vertex $i$ to vertex $j$ (and ``np.inf`` if no path exists between the two vertices in the original graph).\n",
284+
"\n",
285+
"1. Encode the graphs as adjacency matrices of non-fully connected weighted graphs, where all weights corresponding to edges which are present are equal to ``1.`` (or any other positive constant). See section ***Non-fully connected weighted graphs*** above for the different encoding conventions for sparse and dense matrices.\n",
286+
"2. Preprocess the unweighted graph via [GraphGeodesicDistance](https://giotto-ai.github.io/gtda-docs/latest/modules/generated/graphs/processing/gtda.graphs.GraphGeodesicDistance.html) to obtain a FCW graph where edge $ij$ has as weight the length of the shortest path from vertex $i$ to vertex $j$ (and ``np.inf`` if no path exists between the two vertices in the original graph).\n",
283287
"\n",
284288
"### Example 1: Circle graph\n",
285289
"\n",

examples/vietoris_rips_quickstart.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"cell_type": "markdown",
6363
"metadata": {},
6464
"source": [
65-
"**Important note**: ``VietorisRipsPersistence``, and all other \"persistence homology\" transformers in ``gtda.homology``, expect input in the form of a 3D array or, in some cases, a list of 2D arrays. For each entry in the input (here, for each point cloud in ``point_clouds``) they compute a topological summary which is also a 2D array, and then stack all these summaries into a single output 3D array. So, in our case, ``diagrams[i]`` represents the topology of ``point_clouds[i]``. ``diagrams[i]`` is interpreted as follows:\n",
65+
"**Important note**: ``VietorisRipsPersistence``, and all other \"persistent homology\" transformers in ``gtda.homology``, expect input in the form of a 3D array or, in some cases, a list of 2D arrays. For each entry in the input (here, for each point cloud in ``point_clouds``) they compute a topological summary which is also a 2D array, and then stack all these summaries into a single output 3D array. So, in our case, ``diagrams[i]`` represents the topology of ``point_clouds[i]``. ``diagrams[i]`` is interpreted as follows:\n",
6666
"- Each row is a triplet describing a single topological feature found in ``point_clouds[i]``.\n",
6767
"- The first and second entries (respectively) in the triplet denote the values of the \"filtration parameter\" at which the feature appears or disappears respectively. They are referred to as the \"birth\" and \"death\" values of the feature (respectively). The meaning of \"filtration parameter\" depends on the specific transformer, but in the case of ``VietorisRipsPersistence`` on point clouds it has the interpretation of a length scale.\n",
6868
"- A topological feature can be a connected component, 1D hole/loop, 2D cavity, or more generally $d$-dimensional \"void\" which exists in the data at scales between its birth and death values. The integer $d$ is the *homology dimension* (or degree) of the feature and is stored as the third entry in the triplet. In this example, the shapes should have 2D cavities so we explicitly tell ``VietorisRipsPersistence`` to look for these by using the ``homology_dimensions`` parameter!\n",

gtda/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@
1919
# 'X.Y.dev0' is the canonical version of 'X.Y.dev'
2020
#
2121

22-
__version__ = '0.2.2'
22+
__version__ = "0.3.0"

gtda/diagrams/preprocessing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ def transform(self, X, y=None):
471471
Xt : ndarray of shape (n_samples, n_features_filtered, 3)
472472
Filtered persistence diagrams. Only the subdiagrams corresponding
473473
to dimensions in :attr:`homology_dimensions_` are filtered.
474-
``n_features_filtered`` is less than or equal to ``n_features`.
474+
``n_features_filtered`` is less than or equal to ``n_features``.
475475
476476
"""
477477
check_is_fitted(self)

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
MAINTAINER_EMAIL = "[email protected]"
3030
URL = "https://github.com/giotto-ai/giotto-tda"
3131
LICENSE = "GNU AGPLv3"
32-
DOWNLOAD_URL = "https://github.com/giotto-ai/giotto-tda/tarball/v0.2.2"
32+
DOWNLOAD_URL = "https://github.com/giotto-ai/giotto-tda/tarball/v0.3.0"
3333
VERSION = __version__ # noqa
3434
CLASSIFIERS = ["Intended Audience :: Science/Research",
3535
"Intended Audience :: Developers",

0 commit comments

Comments
 (0)