summaryrefslogtreecommitdiff
path: root/src/python/doc/rips_complex_user.rst
diff options
context:
space:
mode:
authorGard Spreemann <gspr@nonempty.org>2020-08-11 13:55:57 +0200
committerGard Spreemann <gspr@nonempty.org>2020-08-11 13:55:57 +0200
commit1c05c20d7cf92c96b5036620cc892cb956c96785 (patch)
tree8ae9a9396ea2b97f617915b8730632917cf786ec /src/python/doc/rips_complex_user.rst
parent9b3079646ee3f6a494b83e864b3e10b8a93597d0 (diff)
parent92fe082aed387ef050d5077157daea9ee3a7c7f4 (diff)
Merge tag 'tags/gudhi-release-3.3.0' into dfsg/latest
Diffstat (limited to 'src/python/doc/rips_complex_user.rst')
-rw-r--r--src/python/doc/rips_complex_user.rst22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/python/doc/rips_complex_user.rst b/src/python/doc/rips_complex_user.rst
index 819568be..6048cc4e 100644
--- a/src/python/doc/rips_complex_user.rst
+++ b/src/python/doc/rips_complex_user.rst
@@ -378,6 +378,7 @@ Example from a point cloud combined with DistanceToMeasure
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Combining with DistanceToMeasure, one can compute the DTM-filtration of a point set, as in `this notebook <https://github.com/GUDHI/TDA-tutorial/blob/master/Tuto-GUDHI-DTM-filtrations.ipynb>`_.
+Remark that `DTMRipsComplex <rips_complex_user.html#dtm-rips-complex>`_ class provides exactly this function.
.. testcode::
@@ -398,3 +399,24 @@ The output is:
.. testoutput::
[(0, (3.1622776601683795, inf)), (0, (3.1622776601683795, 5.39834563766817)), (0, (3.1622776601683795, 5.39834563766817))]
+
+DTM Rips Complex
+----------------
+
+:class:`~gudhi.dtm_rips_complex.DTMRipsComplex` builds a simplicial complex from a point set or a full distance matrix (in the form of ndarray), as described in the above example.
+This class constructs a weighted Rips complex giving larger weights to outliers, which reduces their impact on the persistence diagram. See `this notebook <https://github.com/GUDHI/TDA-tutorial/blob/master/Tuto-GUDHI-DTM-filtrations.ipynb>`_ for some experiments.
+
+.. testcode::
+
+ import numpy as np
+ from gudhi.dtm_rips_complex import DTMRipsComplex
+ pts = np.array([[2.0, 2.0], [0.0, 1.0], [3.0, 4.0]])
+ dtm_rips = DTMRipsComplex(points=pts, k=2)
+ st = dtm_rips.create_simplex_tree(max_dimension=2)
+ print(st.persistence())
+
+The output is:
+
+.. testoutput::
+
+ [(0, (3.1622776601683795, inf)), (0, (3.1622776601683795, 5.39834563766817)), (0, (3.1622776601683795, 5.39834563766817))]