summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortlacombe <lacombe1993@gmail.com>2020-03-31 11:22:50 +0200
committertlacombe <lacombe1993@gmail.com>2020-03-31 11:22:50 +0200
commit4adbdcf16f311b0b5151311f77cfead5bf065bf4 (patch)
tree619fa4ba024d347d7e6fc15543a2fdb06b0b8a6b /src
parent4cdc7f03fb5917134ba8886b026c8990f56bcfeb (diff)
removed barycenters specific doc files as those are included in wasserstein distance now
Diffstat (limited to 'src')
-rw-r--r--src/python/doc/barycenter_sum.inc24
-rw-r--r--src/python/doc/barycenter_user.rst60
2 files changed, 0 insertions, 84 deletions
diff --git a/src/python/doc/barycenter_sum.inc b/src/python/doc/barycenter_sum.inc
deleted file mode 100644
index da2bdd84..00000000
--- a/src/python/doc/barycenter_sum.inc
+++ /dev/null
@@ -1,24 +0,0 @@
-.. table::
- :widths: 30 50 20
-
- +-----------------------------------------------------------------+----------------------------------------------------------------------+------------------------------------------------------------------+
- | .. figure:: | A Frechet mean (or barycenter) is a generalization of the arithmetic | :Author: Theo Lacombe |
- | ./img/barycenter.png | mean in a non linear space such as the one of persistence diagrams. | |
- | :figclass: align-center | Given a set of persistence diagrams :math:`\mu_1 \dots \mu_n`, it is | :Introduced in: GUDHI 3.1.0 |
- | | defined as a minimizer of the variance functional, that is of | |
- | Illustration of Frechet mean between persistence | :math:`\mu \mapsto \sum_{i=1}^n d_2(\mu,\mu_i)^2`. | :Copyright: MIT |
- | diagrams. | where :math:`d_2` denotes the Wasserstein-2 distance between | |
- | | persistence diagrams. | |
- | | It is known to exist and is generically unique. However, an exact | |
- | | computation is in general untractable. Current implementation | :Requires: Python Optimal Transport (POT) :math:`\geq` 0.5.1 |
- | | available is based on [Turner et al, 2014], and uses an EM-scheme to | |
- | | provide a local minimum of the variance functional (somewhat similar | |
- | | to the Lloyd algorithm to estimate a solution to the k-means | |
- | | problem). The local minimum returned depends on the initialization of| |
- | | the barycenter. | |
- | | The combinatorial structure of the algorithm limits its | |
- | | scaling on large scale problems (thousands of diagrams and of points | |
- | | per diagram). | |
- +-----------------------------------------------------------------+----------------------------------------------------------------------+------------------------------------------------------------------+
- | * :doc:`barycenter_user` | |
- +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
diff --git a/src/python/doc/barycenter_user.rst b/src/python/doc/barycenter_user.rst
deleted file mode 100644
index 83e9bebb..00000000
--- a/src/python/doc/barycenter_user.rst
+++ /dev/null
@@ -1,60 +0,0 @@
-:orphan:
-
-.. To get rid of WARNING: document isn't included in any toctree
-
-Barycenter user manual
-================================
-Definition
-----------
-
-.. include:: barycenter_sum.inc
-
-This implementation is based on ideas from "Frechet means for distribution of
-persistence diagrams", Turner et al. 2014.
-
-Function
---------
-.. autofunction:: gudhi.barycenter.lagrangian_barycenter
-
-
-Basic example
--------------
-
-This example computes the Frechet mean (aka Wasserstein barycenter) between
-four persistence diagrams.
-It is initialized on the 4th diagram.
-As the algorithm is not convex, its output depends on the initialization and
-is only a local minimum of the objective function.
-Initialization can be either given as an integer (in which case the i-th
-diagram of the list is used as initial estimate) or as a diagram.
-If None, it will randomly select one of the diagram of the list
-as initial estimate.
-Note that persistence diagrams must be submitted as
-(n x 2) numpy arrays and must not contain inf values.
-
-.. testcode::
-
- import gudhi.barycenter
- import numpy as np
-
- dg1 = np.array([[0.2, 0.5]])
- dg2 = np.array([[0.2, 0.7]])
- dg3 = np.array([[0.3, 0.6], [0.7, 0.8], [0.2, 0.3]])
- dg4 = np.array([])
- pdiagset = [dg1, dg2, dg3, dg4]
- bary = gudhi.barycenter.lagrangian_barycenter(pdiagset=pdiagset,init=3)
-
- message = "Wasserstein barycenter estimated:"
- print(message)
- print(bary)
-
-The output is:
-
-.. testoutput::
-
- Wasserstein barycenter estimated:
- [[0.27916667 0.55416667]
- [0.7375 0.7625 ]
- [0.2375 0.2625 ]]
-
-