How to build an encoder using a distance matrix I have a similarity/distance matrix:

   a | b | c
 a 0 | 1 | 2
 b 1 | 0 | 3
 c 2 | 3 | 0


I want to build an encoder/model that learns an n-dimensional representation of each of the points in the dataset s.t. the euclidean-difference between the representations produces the difference provided in the matrix, e.g. distance(a,b) = 1 etc.

Any ideas?
This is essentially what t-SNE does. It supports transforming data from any input dimension to any output dimension, and it tries to preserve distances between all pairs of points.

From the author's website:


  Can I use a pairwise Euclidean distance matrix as input into t-SNE?
  
  Yes you can! Download the Matlab implementation, and use your pairwise
  Euclidean distance matrix as input into the tsne_d.m function.