Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Multidimensional scaling algorithm for embedding pairwise distances into a Cartesian space
ResourceFunction["PairwiseMultidimensionalScaling"][dm] return a list of 2-dimensional coordinates representing embedding of a distance matrix dm. | |
ResourceFunction["PairwiseMultidimensionalScaling"][dm,dim] embed into a given integer dimension dim. |
Compute 2-dimensional embedding from a distance matrix of three points:
In[1]:= | ![]() |
Out[1]= | ![]() |
Compute 3-dimensional embedding from a distance matrix of four points:
In[2]:= | ![]() |
Out[2]= | ![]() |
Coordinatize an edge-weighted graph:
In[3]:= | ![]() |
Out[3]= | ![]() |
Coordinatize a graph given pairwise distances between vertices:
In[4]:= | ![]() |
Out[5]= | ![]() |
Providing distances of its GraphEmbedding the original graph can be closely reconstructed (up-to translational/rotational/reflectional symmetry):
In[6]:= | ![]() |
Out[6]= | ![]() |
Coordinatize a causal graph:
In[7]:= | ![]() |
Out[8]= | ![]() |
In[9]:= | ![]() |
Out[9]= | ![]() |
PairwiseMultidimensionalScaling embedding is homomorphic to the one computed using ResourceFunction[“MultidimensionalScaling”] for a DistanceMatrix with DistanceFunction → EuclideanDistance, and also similar to DimensionReduce with various methods:
In[10]:= | ![]() |
Out[10]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License