Barycenters {#sec:wb}
-----------------------

The Wasserstein distance (WD) satisfies all metric properties. The *fréchet mean* of a collection of distributions $\MUNL{1:N} \eqdef \{\MUL{i}\}_{i=1}^{N}$ w.r.t the WD is called the *Wasserstein barycenter* (WB). It is the minimizer of the weighted average: $$\label{eq:wb}
    \NU = \underset{\NU \in \MUS(\Y)}{\arg\min} \sum_{i = 1}^{\N} \lambda_{i} \WUL{2}{2}(\MUL{i}, \NU),$$ for $\WeightL{i} \in [0, 1]$ and $\sum_i \WeightL{i} = 1$. We simplify by assuming uniform weights and rewrite it as $$\label{eq:wb2}
    \NU = \underset{\NU \in \MUS(\Y)}{\arg\min} \frac{1}{\N} \sum_{i = 1}^{\N} \int_{\XL{i}}\|\x - \TLU{i}{*}(\x)\|_{2}^{2}d\MUL{i}(\x),$$ $s.t.\ \TLU{i}{*}\#\MUL{i} = \NU$ OT for all $i$. Suppose the barycenter $\NU$ is supported on $\K$ discrete atoms $\bm{\y} = \{\yL{\IdxCentroid}\}_{\IdxCentroid=1}^{\K}$. If we fix $\NU(\yL{\IdxCentroid})$ and only allow updating $\bm{\y}$, then readers can notice that is simultaneously solving $\N$ *constrained K-means* problems

using the same set of centroids with fixed capacity, $\bm{\NU} = \{\NU(\yL{\IdxCentroid})\}_{\IdxCentroid=1}^{\K}$. $\TLU{i}{*}$ serves as the optimal *assignment function* in each K-means problem. Note that $\TLU{i}{*}(\x)$ is a *hard assignment* that has only one target because we solve Monge OT.

To clarify notation, we use $\NU$ to denote the probability distribution whether continuous or discrete. If it is discrete, namely a collection of Dirac measures, then we use $\bm{y}$ and $\bm{\NU}$ to denote its 