Wolfram Function Repository
Instantuse addon functions for the Wolfram Language
Function Repository Resource:
Compute a 3D embedding for multiple graphs so that all pairwise distances are preserved simultaneously along various 2D projections
ResourceFunction["MultiPerspectiveEmbedding"][gs] gives multiperspective 3D embedding of graphs gs. 

ResourceFunction["MultiPerspectiveEmbedding"][ds] gives multiperspective 3D embedding for explicit distance matrices. 
"InitialEmbedding"  Automatic  array of initial embedding vectors 
"InitialProjection"  Automatic  array of initial normal vectors 
"FixProjection"  False  whether to fix or learn projection vectors 
"UseGraphEmbedding"  True  if input are graphs, whether to use its embeddings for computing distances 
"NormalizeDistances"  True  whether to normalize distances 
"NetTrainOptions"  {}  custom options for NetTrain 
TrainingProgressReporting  Automatic  use "Verbose" for custom reporting 
Compute a 3D embedding for a grid graph and a path graph:
In[1]:= 

Out[1]= 

Define larger grid and path graph and show them:
In[2]:= 

Out[3]= 

Compute an embedding:
In[4]:= 

Out[4]= 

View the embedding with the resource function MultiPerspectiveEmbeddingViewer:
In[5]:= 

Out[5]= 

Here is a progress of training an embedding for points that look like digits 1, 2 and 3 in 2D from three distance matrices and how they form into their position:
View the embedding:
In[6]:= 

Out[6]= 

Specify an initial embedding:
In[8]:= 

Out[8]= 

Specify initial normal projection vectors using the "InitialProjection" option. The "Normals" key of the resulting association would contain a new projection normal vectors after training:
In[9]:= 

Out[9]= 

Disable learning for normal vectors. The "Normals" value stays the same:
In[10]:= 

Out[10]= 

By default, distances are taken to be distances between its GraphEmbeddings:
UseGraphEmbedding → False would use GraphDistanceMatrix instead:
Without normalizing distances, training may diverge:
This work is licensed under a Creative Commons Attribution 4.0 International License