Package smile.manifold
Record Class IsotonicMDS
java.lang.Object
java.lang.Record
smile.manifold.IsotonicMDS
- Record Components:
stress
- the objective function value.coordinates
- the principal coordinates
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 ClassesModifier and TypeClassDescriptionstatic final record
Kruskal's non-metric MDS hyperparameters. -
Constructor Summary
ConstructorsConstructorDescriptionIsotonicMDS
(double stress, double[][] coordinates) Creates an instance of aIsotonicMDS
record class. -
Method Summary
Modifier and TypeMethodDescriptiondouble[][]
Returns the value of thecoordinates
record component.final boolean
Indicates whether some other object is "equal to" this one.static IsotonicMDS
fit
(double[][] proximity) Fits Kruskal's non-metric MDS with default k = 2, tolerance = 1E-4 and maxIter = 200.static IsotonicMDS
fit
(double[][] proximity, double[][] init, IsotonicMDS.Options options) Fits Kruskal's non-metric MDS.static IsotonicMDS
fit
(double[][] proximity, IsotonicMDS.Options options) Fits Kruskal's non-metric MDS.final int
hashCode()
Returns a hash code value for this object.double
stress()
Returns the value of thestress
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
IsotonicMDS
public IsotonicMDS(double stress, double[][] coordinates) Creates an instance of aIsotonicMDS
record class.- Parameters:
stress
- the value for thestress
record componentcoordinates
- the value for thecoordinates
record component
-
-
Method Details
-
fit
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
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
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
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. -
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. -
equals
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 withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
stress
public double stress()Returns the value of thestress
record component.- Returns:
- the value of the
stress
record component
-
coordinates
public double[][] coordinates()Returns the value of thecoordinates
record component.- Returns:
- the value of the
coordinates
record component
-