Record Class IsotonicMDS

java.lang.Object
java.lang.Record
smile.manifold.IsotonicMDS
Record Components:
stress - the objective function value.
coordinates - the principal coordinates

public record IsotonicMDS(double stress, double[][] coordinates) extends Record
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.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final record 
    Kruskal's non-metric MDS hyperparameters.
  • Constructor Summary

    Constructors
    Constructor
    Description
    IsotonicMDS(double stress, double[][] coordinates)
    Creates an instance of a IsotonicMDS record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    double[][]
    Returns the value of the coordinates record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    fit(double[][] proximity)
    Fits Kruskal's non-metric MDS with default k = 2, tolerance = 1E-4 and maxIter = 200.
    fit(double[][] proximity, double[][] init, IsotonicMDS.Options options)
    Fits Kruskal's non-metric MDS.
    fit(double[][] proximity, IsotonicMDS.Options options)
    Fits Kruskal's non-metric MDS.
    final int
    Returns a hash code value for this object.
    double
    Returns the value of the stress record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • IsotonicMDS

      public IsotonicMDS(double stress, double[][] coordinates)
      Creates an instance of a IsotonicMDS record class.
      Parameters:
      stress - the value for the stress record component
      coordinates - the value for the coordinates record component
  • Method Details

    • fit

      public static IsotonicMDS fit(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.
    • fit

      public static IsotonicMDS fit(double[][] proximity, IsotonicMDS.Options options)
      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.
      options - the hyperparameters.
      Returns:
      the model.
    • fit

      public static IsotonicMDS fit(double[][] proximity, double[][] init, IsotonicMDS.Options options)
      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.
      options - the hyperparameters.
      Returns:
      the model.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • stress

      public double stress()
      Returns the value of the stress record component.
      Returns:
      the value of the stress record component
    • coordinates

      public double[][] coordinates()
      Returns the value of the coordinates record component.
      Returns:
      the value of the coordinates record component