Formalism for moving from a metric space into a vector space for mathematical/statistical modeling given a data I have a metric space $(X,d)$. I have a physical situation (data) where each physical entity corresponds to an $x \in X$.
I want to do some mathematical/statistical modeling of this data, but the problem is I cant add two elements of this set, as addition is not defined on them or its not closed under addition operation. So i take a strange approach, where I cluster the data, $X$ (using the metric $d$) into $N$ clusters, each cluster $C_i$ having a centroid $K_i$. Now I give a vector space like  representation to each element $x \in X$ as the vector $$x_v = [d(x,K_1),d(x,K_2),....d(x,K_N)] \in V$$ i.e, $x$ is represented by a set of distances from each of the $N$ centroids. This way we moved to a vector space from a metric space, there by enabling us to do some modeling in vector space. After modeling when we get a final new vector $p$, it may not be having any corresponding element in our data $D$, thus we assume such $x$ that $||x_v -p||$ is minimum over entire $D$ or some selected codebook (subset of $D$). 
What want is some form of mathematicaly rigourous formulation of this problem in a formal way, if possible making any suitable assumptions.
 A: There is a concept of the free Banach space over a metric space.  This a canonical way to embed a metric space into a Banach space and was introduced by Arens and Eells in a paper in the Pacific Journal of Mathematics ("On embedding uniform and topological spaces", vol. 6 (1956), 397-403).  One way to construct it is as a predual of a suitable space of Lipschitz functions on the metric space.
A: Your idea reminds me of a standard construction which is often used to prove the existence of a completion of an arbitrary metric space. If a metric space $X$ is bounded, you can embed it into the Banach space $C_b(X;R)$ of bounded continuous functions from $X$ to $R$:  simply identify $x\in X$ with the function $f_x(y)=d(x,y)$. If $X$ is not bounded it is easy to modify this construction: fix a reference point $x_0$ and define $f_x(y)=d(x,y)-d(x_0,y)$. 
A: You may be interested in kernel methods, which are not exactly what you describe but have some of the properties you seem to be seeking.  In particular they can be viewed as a way to use linear algebraic methods to analyze data which does not naturally live in a vector space.
