Fréchet mean for a general shape space I am posting this question in order to gain a better understand of what the Fréchet mean is for a generalised shape space.
So firstly I gather that the Fréchet mean of a probabilty measure $\mu$ on a general metric space $(M,dist)$ is a generalisation of the mean or the expectation of a probability distribution on a Euclidean space and is defined as any global minimum of the function
$$F(x)=\int_Mdist(x,y)^2d\mu(y).$$
This concept can be further generalised by replacing 'dist' in the integrand by a suitable function of the distance.
My question is, what exactly does this formula do? I think it has something to do with minimising the mean between a data set, however I am not sure of this. Also I am not sure how I would use this formula. What exactly is the 'probability measure' in this case? I think it's some kind of statistical distribution, but again I am really not sure.
Any help with this question will be much appreiciated, thank you.
 A: It is always useful to consider a simple example. For example, consider the uniform distribution on $M = [0,1]$ and Euclidean metric $d(x,y) = ||x-y||$. We know that the (usual) mean is $1/2$. So let's check. We aim at minimizing
$$
F(x) = \int_0^1 ||x-y||^2 dy = \int_0^1 (x-y)^2 dy = x^2y-xy^2+y^3/3 \big|_{y=0}^1 = x^2 - x.
$$
It is easy to see that this function attains it's minimum at $x=1/2$.
More general, if the distribution has probability density $p$, we want to minimize
$$
F(x) = \int_M ||x-y||^2 p(y) dy
$$
We compute the minimum by setting the derivative to zero:
$$
d/dx F(x) = \int_M d/dx ||x-y||^2 p(y) dy =  \int_M 2(x-y) p(y) dy \\= 2 x \int_M p(y) dy - 2\int_M y p(y) dy = 2x - 2\int_M y p(y) dy = 0
$$
The last equality is equivalent to
$$
x = \int_M y p(y) dy
$$
Hence, we have shown that if $d$ is the Euclidean metric, the Fréchet mean of a distribution with density $p$ coincides with the usual mean of this distribution $x = \int_M y p(y) dy$
Even more general, there need not be a density, you may want to use the abstract formulation using a probability measure $\mu$
$$
F(x) = \int_M ||x-y||^2 d \mu(y)
$$
