Class SammonMapping
- java.lang.Object
-
- smile.mds.SammonMapping
-
public class SammonMapping extends java.lang.ObjectThe Sammon's mapping is an iterative technique for making interpoint distances in the low-dimensional projection as close as possible to the interpoint distances in the high-dimensional object. Two points close together in the high-dimensional space should appear close together in the projection, while two points far apart in the high dimensional space should appear far apart in the projection. The Sammon's mapping is a special case of metric least-square multidimensional scaling.Ideally when we project from a high dimensional space to a low dimensional space the image would be geometrically congruent to the original figure. This is called an isometric projection. Unfortunately it is rarely possible to isometrically project objects down into lower dimensional spaces. Instead of trying to achieve equality between corresponding inter-point distances we can minimize the difference between corresponding inter-point distances. This is one goal of the Sammon's mapping algorithm. A second goal of the Sammon's mapping algorithm is to preserve the topology as best as possible by giving greater emphasize to smaller interpoint distances. The Sammon's mapping algorithm has the advantage that whenever it is possible to isometrically project an object into a lower dimensional space it will be isometrically projected into the lower dimensional space. But whenever an object cannot be projected down isometrically the Sammon's mapping projects it down to reduce the distortion in interpoint distances and to limit the change in the topology of the object.
The projection cannot be solved in a closed form and may be found by an iterative algorithm such as gradient descent suggested by Sammon. Kohonen also provides a heuristic that is simple and works reasonably well.
-
-
Constructor Summary
Constructors Constructor and Description SammonMapping(double[][] proximity)Constructor.SammonMapping(double[][] proximity, double[][] coordinates)Constructor.SammonMapping(double[][] proximity, double[][] init, double lambda, double tol, int maxIter)Constructor.SammonMapping(double[][] proximity, int k)Constructor.SammonMapping(double[][] proximity, int k, double lambda, double tol, int maxIter)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description double[][]getCoordinates()Returns the coordinates of projected data.doublegetStress()Returns the final stress achieved.
-
-
-
Constructor Detail
-
SammonMapping
public SammonMapping(double[][] proximity)
Constructor. Learn a 2-dimensional Sammon's mapping with default lambda = 0.2, tolerance = 1E-4 and maxIter = 100.- Parameters:
proximity- the nonnegative proximity matrix of dissimilarities. The diagonal should be zero and all other elements should be positive and symmetric.
-
SammonMapping
public SammonMapping(double[][] proximity, int k)Constructor. Learn Sammon's mapping with default lambda = 0.2, tolerance = 1E-4 and maxIter = 100.- Parameters:
proximity- the nonnegative proximity matrix of dissimilarities. The diagonal should be zero and all other elements should be positive and symmetric.k- the dimension of the projection.
-
SammonMapping
public SammonMapping(double[][] proximity, double[][] coordinates)Constructor. Learn Sammon's mapping with default lambda = 0.2, tolerance = 1E-4 and maxIter = 100.- Parameters:
proximity- the nonnegative proximity matrix of dissimilarities. The diagonal should be zero and all other elements should be positive and symmetric.coordinates- the initial projected coordinates, of which the column size is the projection dimension.
-
SammonMapping
public SammonMapping(double[][] proximity, int k, double lambda, double tol, int maxIter)Constructor. Learn Sammon's mapping.- Parameters:
proximity- the nonnegative proximity matrix of dissimilarities. The diagonal should be zero and all other elements should be positive and symmetric.k- the dimension of the projection.lambda- initial value of the step size constant in diagonal Newton method.tol- tolerance for stopping iterations.maxIter- maximum number of iterations.
-
SammonMapping
public SammonMapping(double[][] proximity, double[][] init, double lambda, double tol, int maxIter)Constructor. Learn Sammon's mapping.- Parameters:
proximity- the nonnegative proximity matrix of dissimilarities. The diagonal should be zero and all other elements should be positive and symmetric.init- the initial projected coordinates, of which the column size is the projection dimension.lambda- initial value of the step size constant in diagonal Newton method.tol- tolerance for stopping iterations.maxIter- maximum number of iterations.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG