diff options
Diffstat (limited to 'ot/lp/__init__.py')
-rw-r--r-- | ot/lp/__init__.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/ot/lp/__init__.py b/ot/lp/__init__.py index 2ff02ab..4952a21 100644 --- a/ot/lp/__init__.py +++ b/ot/lp/__init__.py @@ -253,7 +253,7 @@ def emd(a, b, M, numItermax=100000, log=False, center_dual=True, numThreads=1): Otherwise returns only the optimal transportation matrix. center_dual: boolean, optional (default=True) If True, centers the dual potential using function - :ref:`center_ot_dual`. + :py:func:`ot.lp.center_ot_dual`. numThreads: int or "max", optional (default=1, i.e. OpenMP is not used) If compiled with OpenMP, chooses the number of threads to parallelize. "max" selects the highest number possible. @@ -418,7 +418,7 @@ def emd2(a, b, M, processes=1, If True, returns the optimal transportation matrix in the log. center_dual: boolean, optional (default=True) If True, centers the dual potential using function - :ref:`center_ot_dual`. + :py:func:`ot.lp.center_ot_dual`. numThreads: int or "max", optional (default=1, i.e. OpenMP is not used) If compiled with OpenMP, chooses the number of threads to parallelize. "max" selects the highest number possible. @@ -631,6 +631,7 @@ def free_support_barycenter(measures_locations, measures_weights, X_init, b=None .. _references-free-support-barycenter: + References ---------- .. [20] Cuturi, Marco, and Arnaud Doucet. "Fast computation of Wasserstein barycenters." International Conference on Machine Learning. 2014. @@ -688,7 +689,7 @@ def free_support_barycenter(measures_locations, measures_weights, X_init, b=None def generalized_free_support_barycenter(X_list, a_list, P_list, n_samples_bary, Y_init=None, b=None, weights=None, numItermax=100, stopThr=1e-7, verbose=False, log=None, numThreads=1, eps=0): r""" - Solves the free support generalised Wasserstein barycenter problem: finding a barycenter (a discrete measure with + Solves the free support generalized Wasserstein barycenter problem: finding a barycenter (a discrete measure with a fixed amount of points of uniform weights) whose respective projections fit the input measures. More formally: @@ -776,7 +777,7 @@ def generalized_free_support_barycenter(X_list, a_list, P_list, n_samples_bary, Y_init = nx.randn(n_samples_bary, d, type_as=X_list[0]) if b is None: - b = nx.ones(n_samples_bary, type_as=X_list[0]) / n_samples_bary # not optimised + b = nx.ones(n_samples_bary, type_as=X_list[0]) / n_samples_bary # not optimized out = free_support_barycenter(Z_list, a_list, Y_init, b, numItermax=numItermax, stopThr=stopThr, verbose=verbose, log=log, numThreads=numThreads) @@ -786,7 +787,7 @@ def generalized_free_support_barycenter(X_list, a_list, P_list, n_samples_bary, else: Y = out log_dict = None - Y = Y @ B.T # return to the Generalised WB formulation + Y = Y @ B.T # return to the Generalized WB formulation if log: return Y, log_dict |