From 0ed4c3bba47d1375acb49596db2c863c38e9a090 Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Mon, 11 May 2020 08:39:11 +0200 Subject: Fix #299 --- src/python/gudhi/persistence_graphical_tools.py | 18 ++++++++++-------- src/python/gudhi/point_cloud/knn.py | 4 ++++ src/python/gudhi/point_cloud/timedelay.py | 5 ++--- src/python/gudhi/representations/metrics.py | 4 +++- 4 files changed, 19 insertions(+), 12 deletions(-) (limited to 'src/python/gudhi') diff --git a/src/python/gudhi/persistence_graphical_tools.py b/src/python/gudhi/persistence_graphical_tools.py index cc3db467..e36af304 100644 --- a/src/python/gudhi/persistence_graphical_tools.py +++ b/src/python/gudhi/persistence_graphical_tools.py @@ -72,11 +72,11 @@ def plot_persistence_barcode( """This function plots the persistence bar code from persistence values list , a np.array of shape (N x 2) (representing a diagram in a single homology dimension), - or from a :doc:`persistence file `. + or from a `persistence diagram `__ file. :param persistence: Persistence intervals values list. Can be grouped by dimension or not. :type persistence: an array of (dimension, array of (birth, death)) or an array of (birth, death). - :param persistence_file: A :doc:`persistence file ` style name + :param persistence_file: A `persistence diagram `__ file style name (reset persistence if both are set). :type persistence_file: string :param alpha: barcode transparency value (0.0 transparent through 1.0 @@ -214,11 +214,11 @@ def plot_persistence_diagram( ): """This function plots the persistence diagram from persistence values list, a np.array of shape (N x 2) representing a diagram in a single - homology dimension, or from a :doc:`persistence file `. + homology dimension, or from a `persistence diagram `__ file`. :param persistence: Persistence intervals values list. Can be grouped by dimension or not. :type persistence: an array of (dimension, array of (birth, death)) or an array of (birth, death). - :param persistence_file: A :doc:`persistence file ` style name + :param persistence_file: A `persistence diagram `__ file style name (reset persistence if both are set). :type persistence_file: string :param alpha: plot transparency value (0.0 transparent through 1.0 @@ -369,17 +369,19 @@ def plot_persistence_density( """This function plots the persistence density from persistence values list, np.array of shape (N x 2) representing a diagram in a single homology dimension, - or from a :doc:`persistence file `. Be - aware that this function does not distinguish the dimension, it is + or from a `persistence diagram `__ file. + Be aware that this function does not distinguish the dimension, it is up to you to select the required one. This function also does not handle degenerate data set (scipy correlation matrix inversion can fail). + :Requires: `SciPy `__ + :param persistence: Persistence intervals values list. Can be grouped by dimension or not. :type persistence: an array of (dimension, array of (birth, death)) or an array of (birth, death). - :param persistence_file: A :doc:`persistence file ` - style name (reset persistence if both are set). + :param persistence_file: A `persistence diagram `__ + file style name (reset persistence if both are set). :type persistence_file: string :param nbins: Evaluate a gaussian kde on a regular grid of nbins x nbins over data extents (default is 300) diff --git a/src/python/gudhi/point_cloud/knn.py b/src/python/gudhi/point_cloud/knn.py index 34e80b5d..19363097 100644 --- a/src/python/gudhi/point_cloud/knn.py +++ b/src/python/gudhi/point_cloud/knn.py @@ -19,6 +19,10 @@ __license__ = "MIT" class KNearestNeighbors: """ Class wrapping several implementations for computing the k nearest neighbors in a point set. + + :Requires: `PyKeOps `__, `SciPy `__, + `Scikit-learn `__, and/or `Hnswlib `__ + in function of the selected `implementation`. """ def __init__(self, k, return_index=True, return_distance=False, metric="euclidean", **kwargs): diff --git a/src/python/gudhi/point_cloud/timedelay.py b/src/python/gudhi/point_cloud/timedelay.py index f01df442..5292e752 100644 --- a/src/python/gudhi/point_cloud/timedelay.py +++ b/src/python/gudhi/point_cloud/timedelay.py @@ -10,9 +10,8 @@ import numpy as np class TimeDelayEmbedding: - """Point cloud transformation class. - Embeds time-series data in the R^d according to [Takens' Embedding Theorem] - (https://en.wikipedia.org/wiki/Takens%27s_theorem) and obtains the + """Point cloud transformation class. Embeds time-series data in the R^d according to + `Takens' Embedding Theorem `_ and obtains the coordinates of each point. Parameters diff --git a/src/python/gudhi/representations/metrics.py b/src/python/gudhi/representations/metrics.py index ce416fb1..0a6dd680 100644 --- a/src/python/gudhi/representations/metrics.py +++ b/src/python/gudhi/representations/metrics.py @@ -223,7 +223,9 @@ class SlicedWassersteinDistance(BaseEstimator, TransformerMixin): class BottleneckDistance(BaseEstimator, TransformerMixin): """ - This is a class for computing the bottleneck distance matrix from a list of persistence diagrams. + This is a class for computing the bottleneck distance matrix from a list of persistence diagrams. + + :Requires: `CGAL `__ :math:`\geq` 4.11.0 """ def __init__(self, epsilon=None): """ -- cgit v1.2.3