From 98ce4ccd3536d95c609ee1c5b737ced85d68f786 Mon Sep 17 00:00:00 2001 From: vivienseguy Date: Thu, 5 Jul 2018 18:26:55 +0900 Subject: free support barycenter --- ot/lp/cvx.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ot') diff --git a/ot/lp/cvx.py b/ot/lp/cvx.py index 91a5922..b74960f 100644 --- a/ot/lp/cvx.py +++ b/ot/lp/cvx.py @@ -217,7 +217,7 @@ def free_support_barycenter(measures_locations, measures_weights, X_init, b_init M_i = ot.dist(X, measure_locations_i) T_i = ot.emd(b_init, measure_weights_i, M_i) - T_sum += np.reshape(1. / b_init, (-1, 1)) * np.matmul(T_i, measure_locations_i) + T_sum = T_sum + weight_i*np.reshape(1. / b_init, (-1, 1)) * np.matmul(T_i, measure_locations_i) displacement_square_norm = np.sum(np.square(X-T_sum)) X = T_sum -- cgit v1.2.3