Let $X$ be a compact metric space. A $k$ mean on $X$ is a continuous map $f:X^{k}\to X$ which is identity on the diagonal and is invariant under all $k$-permutations. For details, See the following paper <http://www.sciencedirect.com/science/article/pii/S0723086904800161>


Assume that $X$ is a compact metric space which admit a $k$ mean for every $k$. Can we equip $X$ to a family of $k$-means $f\_{k}:X^{k} \to X$ with the following uniform continuity property:


For every $\varepsilon$ there is a $\delta$ such that for every two finite subset $A$ and $B$ of $X$ with cardinality $n,m$,resp. and $d\_{H}(A,B)<\delta$ we have $d(f\_{n}(A), f\_{m}(B))< \varepsilon$.


Here $d\_{H}$ is the Hausdorff distance.


Then the next question is that: for any such metric space, is it true that $X$ is a retract of $2^{X}$, the hyperspace.(Since every compact subset can be approximated by a finite set)



Mean on compact metric spaces
The uniform continuity property that you have mentioned does guarantee that $X$ is a retract of the hyperspace $H(X)$. Let $[X]^{<\omega}$ denote the collection of all finite subsets of $X$. Then $[X]^{<\omega}$ is a dense subspace of $H(X)$. Suppose that for each $\epsilon>0$ there is a $\delta>0$ such that for each $A,B\subseteq X$ with $d\_{H}(A,B)<\delta$, we have $d(f\_{n}(A),f\_{m}(B))<\epsilon$. Define a mapping $j:[X]^{<\omega}\rightarrow X$ by letting $j(A)=f\_{n}(A)$ whenever $|A|=n$. Then $j$ is uniformly continuous.


It is well known that if $(X,\mathcal{U}),(Y,\mathcal{V})$ are uniform spaces and $(Y,\mathcal{V})$ is complete, then every uniformly continuous mapping $f:X\rightarrow Y$ extends to a uniformly continuous mapping $\overline{f}:\overline{X}\rightarrow Y$ where $\overline{X}$ is the completion of $\overline{X}$. Therefore, the mapping $j:[X]^{<\omega}\rightarrow $ extends to a uniformly continuous map $k:H(X)\rightarrow X$ and the mapping $k$ is clearly a retraction.


However, I must mention that it is often the case that there does not exist a retraction from $H(X)$ to $X$ since if $X$ is a Peano continuum and there is a retraction from $H(X)$ to $X$, then $X$ is contractible. 


$\mathbf{Proposition}$ If $X$ is a Peano continuum and there is a retraction from $H(X)$ to $X$, then there is a deformation retract from $X$ to any point $x\_{0}\in X$.


$\mathbf{Proof}$ By [this answer](https://mathoverflow.net/a/111406/22277), the hyperspace of any Peano continuum (locally connected continuum) is homeomorphic to the Hilbert cube. Since $H(X)$ is homeomorphic to the Hilbert cube, there is a deformation retract $T:H(X)\times[0,1]\rightarrow H(X)$ from $H(X)$ to the point $x\_{0}$. In other words, $T$ is a continuous mapping with $T(x\_{0},t)=x\_{0}$ and $T(C,0)=x,T(C,1)=x\_{0}$ for each $C\in H(X)$. Let $j:H(X)\rightarrow X$ be a retraction. Define a mapping $V:X\times[0,1]\rightarrow X$ by $V(x,t)=j T(x,t)$. Then $V$ is clearly a deformation retract from $X$ to the point $x\_{0}$. $\mathbf{QED}$


$\textbf{There are sometimes retracts from spaces of measures}$
For this section, we shall suppose that $X$ is a compact metric space.


Using a mean to obtain a retraction from the hyperspace $H(X)$ to $X$ seems a little bit unnatural and the uniform continuity condition that you have mentioned is a bit unnatural as well (I must mention that I can imagine that there are contexts in which this uniform continuity condition would appear). We shall therefore now take a retraction from the space $\mathcal{M}(X)$ of all regular Borel probability measures on $X$ to $X$. The space $\mathcal{M}(X)$ shall be endowed with the weak$^{\*}$-topology.


Let $\delta\_{x}$ be the measure where $\int fd\delta\_{x}=f(x)$ for each continuous $f$. By associating each point $x\in X$ with the measure $\delta\_{x}$, we shall regard the space $X$ as a closed subspace of $\mathcal{M}(X)$. Take note that since $\mathcal{M}(X)$ is a convex subset of the space of all signed measures on $X$, there for each $x\_{0}\in X$, there is a deformation retract of $\mathcal{M}(X)$ to any point measure $\delta\_{x\_{0}}$. Therefore, if there is a retract from $\mathcal{M}(X)$ to $X$, then for each $x\_{0}\in X$, there is a deformation retract from $X$ to $x\_{0}$.


Suppose now that $(X,d)$ is a compact metric space. The we shall call a family of functions $\mathcal{A}\subseteq\bigcup\_{n\in\omega}C(X^{n},X)$ equicontinuous in the mean if for each $\epsilon>0$ there is some $\delta>0$ such that if $f\in\mathcal{A},f:X^{n}\rightarrow X$ and
if $\frac{1}{n}[d(x\_{1},y\_{1})+...+d(x\_{n},y\_{n})]<\delta$, then
$d(f(x\_{1},...,x\_{n}),f(y\_{1},...,y\_{n}))<\epsilon$.


We say that a continuous binary operation $\*$ on $X$ is a mean if it satisfies the following identities


1. $x\*x=x$
2. $x\*y=y\*x$
3. $(w\*x)\*(y\*z)=(w\*y)\*(x\*z)$.


Suppose that $\*$ is a mean. Then define operations $m\_{n}^{\*}:X^{2^{n}}\rightarrow X$ (the operations $m\_{n}^{\*}$ were mentioned by Eric Wofsey in [this answer](https://mathoverflow.net/a/191343/22277)) for all $n>0$ by induction:


$m^{\*}\_{1}(x,y)=x\*y$


$m^{\*}\_{n+1}(x\_{1},...,x\_{2^{n+1}})=m^{\*}\_{n}(x\_{1},...,x\_{2^{n}})\*m^{\*}\_{n}(x\_{1},...,x\_{2^{n}})$.


$\mathbf{Example}$ Suppose that $\*$ is a mean on a compact metric space $(X,d)$ such that $d(x\_{1}\*x\_{2},y\_{1}\*y\_{2})<\frac{1}{2}(d(x\_{1},y\_{1})+d(x\_{2},y\_{2}))$. Then the family of mappings $\{m\_{n}^{\*}|n\in\mathbb{N}\}$ is equicontinuous in the mean.


Suppose now that $\*$ is a mean on a compact metric space $(X,d)$. 


Let $\mathcal{A}\subseteq\mathcal{M}(X)$ be the set of all measures of the form $\frac{1}{2^{n}}(\delta\_{x\_{1}}+...+\delta\_{x\_{2^{n}}})$. Since $\mathcal{M}(X)$ is a compact space in the weak$^{\*}$-topology, the space $\mathcal{M}(X)$ has a unique uniformity.


Suppose that $\*$ is a mean on a compact metric space $(X,d)$. Define a mapping $j\_{\*}:\mathcal{A}\rightarrow X$ by letting $j\_{\*}(\frac{1}{2^{n}}(\delta\_{x\_{1}}+...+\delta\_{x\_{2^{n}}}))=m^{\*}(x\_{1},...,x\_{2^{n}})$. 


$\mathbf{Theorem}$ Suppose that $\*$ is a mean on a compact metric space such that $\{m^{\*}\_{n})|n\in\mathbb{N}\}$ is equicontiuous in the mean. Then the mapping $j\_{\*}$ is uniformly continuous. In particular, the mapping $j\_{\*}$ extends to a unique mapping $k\_{\*}:\mathcal{M}(X)\rightarrow X$ (and the mapping $k\_{\*}$ is a retract).


$\mathbf{Proof}$ For this theorem, let $D=\max\_{x,y\in X}d(x,y)$


Suppose that $\epsilon>0$. Then since $\{m\_{n}^{\*}|n\in\mathbb{N}\}$ is equicontinuous in the mean, there is some $\delta>0$ such that if $n>0$ and $\frac{1}{2^{n}}(d(x\_{1},y\_{1})+...+d(x\_{2^{n}},y\_{2^{n}}))<\delta$, then $d(m\_{n}^{\*}(x\_{1},...,x\_{2^{n}}),m\_{n}^{\*}(y\_{1},...,y\_{2^{n}})<\epsilon$


Now let $\beta>0,\alpha>0$. Then there are $f\_{1},...,f\_{k}:X\rightarrow[0,1]$ such that whenever $1\leq i\leq k$ the support $\textrm{supp}(f\_{i})$ has diameter less than $\alpha$ and where
$\{(f\_{i}^{-1}[\{1\}])^{\circ}|1\leq i\leq k\}$ covers $X$. Let $U\_{i}=f^{-1}\_{i}[\{1\}]^{\circ}$ whenever $1\leq i\leq k$.


If $A\subseteq\{1,...,k\}$, then let $f\_{A}=\max\_{a\in A}f\_{a}$.


Now suppose that $\mu,\nu\in\mathcal{A}$ and
$$|\int f\_{A}d\mu-\int f\_{A}d\nu|<\beta$$ for each $A\subseteq\{1,...,k\}$.


Then there is some $n$ and $x\_{1},...,x\_{2^{n}},y\_{1},...,y\_{2^{n}}$ such that 
$$\mu=\frac{1}{2^{n}}(\delta\_{x\_{1}}+...+\delta\_{x\_{2^{n}}}),\nu=\frac{1}{2^{n}}(\delta\_{y\_{1}}+...+\delta\_{y\_{2^{n}}})$$. Then since $$\int f\_{A}d\mu=\frac{1}{2^{n}}(f\_{A}(x\_{1})+...+f\_{A}(x\_{2^{n}})),\int f\_{A}d\nu=\frac{1}{2^{n}}(f\_{A}(y\_{1})+...+f\_{A}(y\_{2^{n}})),$$ we have 
$$|\frac{1}{2^{n}}(f\_{A}(x\_{1})+...+f\_{A}(x\_{2^{n}}))-\frac{1}{2^{n}}(f\_{A}(y\_{1})+...+f\_{A}(x\_{2^{n}})|<\beta$$
for each $A\subseteq\{1,...,k\}$, so
$|(f\_{A}(x\_{1})+...+f\_{A}(x\_{2^{n}}))-(f\_{A}(y\_{1})+...+f\_{A}(y\_{2^{n}}))|<2^{n}\beta$.


Let $r=\lfloor 2^{n}\cdot\beta\rfloor$. 


If $1\leq i\leq 2^{n}$, then let $M(i)=\{j\in\{1,...,2^{n}\}|d(x\_{i},y\_{j})<\alpha\}$ and if $R\subseteq\{1,...,2^{n}\}$, then let $M(R)=\bigcup\_{r\in R}M(r)$. 


Suppose now that $R\subseteq\{1,...,2^{n}\}$. Let $a\_{r}\in\{1,...,k\}$ be such that $x\_{r}\in U\_{a\_{r}}$. Let $A=\{a\_{r}|r\in R\}$.


Then $f\_{A}(x\_{r})=1$ for each $r\in R$, so 


$f\_{A}(x\_{1})+...+f\_{A}(x\_{2^{n}})\geq |R|$. Therefore, $f\_{A}(y\_{1})+...+f\_{A}(y\_{2^{n}})>|R|-2^{n}\beta$.


Take note that there must be at least $|R|-r$ indices $i$ such that $f\_{A}(y\_{i})\neq 0$.


However, if $f\_{A}(y\_{i})>0$, the $y\_{i}\in\mathrm{supp}(f\_{a\_{r}})$ for some $r\in R$, so since $\mathbf{supp}(f\_{a\_{r}})$ has diameter less than $\alpha$, we conclude that $y\_{i}$ is within $\alpha$ distance of $x\_{r}$. We therefore conclude that $i\in M(r)$, so $i\in M(R)$. Therefore, we conclude that $|M(R)|\geq|R|-r$.


If $1\leq i\leq 2^{n}$, then let $N(i)=\{j:1\leq j\leq 2^{n},d(x\_{i},y\_{i})<\alpha\}\cup\{2^{n}+1,...,2^{n}+r\}$ and if $2^{n}<i\leq 2^{n}+r$, then let $N(i)=\{1,...,2^{n}+r\}$. If $A\subseteq\{1,...,2^{n}+r\}$, then define $N(A)=\bigcup\_{a\in A}N(a)$. Then $|N(A)|\geq|A|$ for each $A\subseteq\{1,...,2^{n}+r\}$. Therefore, by Hall's marriage theorem, there exists a bijection $f:\{1,...,2^{n}+r\}\rightarrow\{1,...,2^{n}+r\}$ such that $f(i)\in N(i)$ for $1\leq i\leq 2^{n}+r$. Therefore, by restricting $f$ to a function whose domain and range are subsets of $\{1,...,2^{n}\}$, we conclude that there are $A,B\subseteq\{1,...,2^{n}\}$ such that $|A|\geq 2^{n}-r,|B|\geq 2^{n}-r$ and a bijection $h:A\rightarrow B$ such that $h(i)\in N(i)$ for $i\in A$. Extend the bijection $h$ to a bijection $g:\{1,...,2^{k}\}\rightarrow\{1,...,2^{k}\}$. Then 
$$\frac{1}{2^{n}}(d(x\_{1},y\_{g(1)})+...+d(x\_{2^{n}},y\_{g(2^{n})}))$$
$$=\frac{1}{2^{n}}[\sum\_{a\in A}d(x\_{a},y\_{g(a)})+\sum\_{b\in\{1,...,2^{n}\}\setminus A}d(x\_{b},y\_{g(b)})]$$


$$<\frac{1}{2^{n}}(2^{n}\cdot\alpha+r D)=\alpha+D\frac{r}{2^{n}}\leq \alpha+D\beta.$$


Therefore, choose $\alpha,\beta$ such that $\alpha+D\beta<\delta$. Then we have 


$$\frac{1}{2^{n}}(d(x\_{1},y\_{g(1)})+...+d(x\_{2^{n}},y\_{g(2^{n})}))<\delta.$$


Therefore, we have


$$d(j\_{\*}(\mu),j\_{\*}(\nu))=d(m^{\*}\_{n}(x\_{1},...,x\_{2^{n}}),m^{\*}\_{n}(y\_{1},...,y\_{2^{n}})))$$


$$=d(m^{\*}\_{n}(x\_{1},...,x\_{2^{n}}),m^{\*}\_{n}(y\_{g(1)},...,y\_{g(2^{n})}))<\epsilon.$$


We conclude that the mapping $j^{\*}$ is uniformly continuous.


$\mathbf{QED}$


