ott.solvers.linear.continuous_barycenter.WassersteinBarycenter.init_state#

WassersteinBarycenter.init_state(bar_prob, bar_size, x_init=None, rng=0)[source]#

Initialize the state of the Wasserstein barycenter iterations.

Parameters
  • bar_prob (BarycenterProblem) – The barycenter problem.

  • bar_size (int) – Size of the barycenter.

  • x_init (Optional[Array]) – Initial barycenter estimate of shape [bar_size, ndim]. If None, bar_size points will be sampled from the input measures according to their weights flattened_y.

  • rng (int) – Seed for jax.random.PRNGKey().

Return type

BarycenterState

Returns

The initial barycenter state.