You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Correct documentation for support barycenter (#201)
* example for log treatment in bregman.py
* Improve doc
* Revert "example for log treatment in bregman.py"
This reverts commit 9f51c14
* Add comments by Flamary
* Delete repetitive description
* Added raw string to avoid pbs with backslashes
Solves the free support (locations of the barycenters are optimized, not the weights) Wasserstein barycenter problem (i.e. the weighted Frechet mean for the 2-Wasserstein distance)
438
+
r"""
439
+
Solves the free support (locations of the barycenters are optimized, not the weights) Wasserstein barycenter problem (i.e. the weighted Frechet mean for the 2-Wasserstein distance), formally:
440
+
441
+
.. math::
442
+
\min_X \sum_{i=1}^N w_i W_2^2(b, X, a_i, X_i)
443
+
444
+
where :
445
+
446
+
- :math:`w \in \mathbb{(0, 1)}^{N}`'s are the barycenter weights and sum to one
447
+
- the :math:`a_i \in \mathbb{R}^{k_i}` are the empirical measures weights and sum to one for each :math:`i`
448
+
- the :math:`X_i \in \mathbb{R}^{k_i, d}` are the empirical measures atoms locations
449
+
- :math:`b \in \mathbb{R}^{k}` is the desired weights vector of the barycenter
440
450
441
-
The function solves the Wasserstein barycenter problem when the barycenter measure is constrained to be supported on k atoms.
442
451
This problem is considered in [1] (Algorithm 2). There are two differences with the following codes:
452
+
443
453
- we do not optimize over the weights
444
454
- we do not do line search for the locations updates, we use i.e. theta = 1 in [1] (Algorithm 2). This can be seen as a discrete implementation of the fixed-point algorithm of [2] proposed in the continuous setting.
445
455
446
456
Parameters
447
457
----------
448
-
measures_locations : list of (k_i,d) numpy.ndarray
458
+
measures_locations : list of N (k_i,d) numpy.ndarray
449
459
The discrete support of a measure supported on k_i locations of a d-dimensional space (k_i can be different for each element of the list)
450
-
measures_weights : list of (k_i,) numpy.ndarray
460
+
measures_weights : list of N (k_i,) numpy.ndarray
451
461
Numpy arrays where each numpy array has k_i non-negatives values summing to one representing the weights of each discrete input measure
452
462
453
463
X_init : (k,d) np.ndarray
454
464
Initialization of the support locations (on k atoms) of the barycenter
455
465
b : (k,) np.ndarray
456
466
Initialization of the weights of the barycenter (non-negatives, sum to 1)
457
-
weights : (k,) np.ndarray
467
+
weights : (N,) np.ndarray
458
468
Initialization of the coefficients of the barycenter (non-negatives, sum to 1)
0 commit comments