Class IsotonicMDS

java.lang.Object
smile.manifold.IsotonicMDS

public class IsotonicMDS extends Object
Kruskal's non-metric MDS. In non-metric MDS, only the rank order of entries in the proximity matrix (not the actual dissimilarities) is assumed to contain the significant information. Hence, the distances of the final configuration should as far as possible be in the same rank order as the original data. Note that a perfect ordinal re-scaling of the data into distances is usually not possible. The relationship is typically found using isotonic regression.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final double[][]
    The coordinates.
    final double
    The final stress achieved.
  • Constructor Summary

    Constructors
    Constructor
    Description
    IsotonicMDS(double stress, double[][] coordinates)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    of(double[][] proximity)
    Fits Kruskal's non-metric MDS with default k = 2, tolerance = 1E-4 and maxIter = 200.
    of(double[][] proximity, double[][] init, double tol, int maxIter)
    Fits Kruskal's non-metric MDS.
    of(double[][] proximity, int k)
    Fits Kruskal's non-metric MDS.
    of(double[][] proximity, int k, double tol, int maxIter)
    Fits Kruskal's non-metric MDS.
    of(double[][] proximity, Properties params)
    Fits Kruskal's non-metric MDS.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • stress

      public final double stress
      The final stress achieved.
    • coordinates

      public final double[][] coordinates
      The coordinates.
  • Constructor Details

    • IsotonicMDS

      public IsotonicMDS(double stress, double[][] coordinates)
      Constructor.
      Parameters:
      stress - the objective function value.
      coordinates - the principal coordinates
  • Method Details

    • of

      public static IsotonicMDS of(double[][] proximity)
      Fits Kruskal's non-metric MDS with default k = 2, tolerance = 1E-4 and maxIter = 200.
      Parameters:
      proximity - the non-negative proximity matrix of dissimilarities. The diagonal should be zero and all other elements should be positive and symmetric.
      Returns:
      the model.
    • of

      public static IsotonicMDS of(double[][] proximity, int k)
      Fits Kruskal's non-metric MDS.
      Parameters:
      proximity - the non-negative proximity matrix of dissimilarities. The diagonal should be zero and all other elements should be positive and symmetric.
      k - the dimension of the projection.
      Returns:
      the model.
    • of

      public static IsotonicMDS of(double[][] proximity, Properties params)
      Fits Kruskal's non-metric MDS.
      Parameters:
      proximity - the non-negative proximity matrix of dissimilarities. The diagonal should be zero and all other elements should be positive and symmetric. For pairwise distances matrix, it should be just the plain distance, not squared.
      params - the hyperparameters.
      Returns:
      the model.
    • of

      public static IsotonicMDS of(double[][] proximity, int k, double tol, int maxIter)
      Fits Kruskal's non-metric MDS.
      Parameters:
      proximity - the non-negative proximity matrix of dissimilarities. The diagonal should be zero and all other elements should be positive and symmetric.
      k - the dimension of the projection.
      tol - the tolerance for stopping iterations.
      maxIter - maximum number of iterations.
      Returns:
      the model.
    • of

      public static IsotonicMDS of(double[][] proximity, double[][] init, double tol, int maxIter)
      Fits Kruskal's non-metric MDS.
      Parameters:
      proximity - the non-negative 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.
      tol - the tolerance for stopping iterations.
      maxIter - maximum number of iterations.
      Returns:
      the model.