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 recordKruskal's non-metric MDS hyperparameters. -
Constructor Summary
ConstructorsConstructorDescriptionIsotonicMDS(double stress, double[][] coordinates) Creates an instance of aIsotonicMDSrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondouble[][]Returns the value of thecoordinatesrecord component.final booleanIndicates whether some other object is "equal to" this one.static IsotonicMDSfit(double[][] proximity) Fits Kruskal's non-metric MDS with default k = 2, tolerance = 1E-4 and maxIter = 200.static IsotonicMDSfit(double[][] proximity, double[][] init, IsotonicMDS.Options options) Fits Kruskal's non-metric MDS.static IsotonicMDSfit(double[][] proximity, IsotonicMDS.Options options) Fits Kruskal's non-metric MDS.final inthashCode()Returns a hash code value for this object.doublestress()Returns the value of thestressrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
IsotonicMDS
public IsotonicMDS(double stress, double[][] coordinates) Creates an instance of aIsotonicMDSrecord class.- Parameters:
stress- the value for thestressrecord componentcoordinates- the value for thecoordinatesrecord 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
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
stress
-
coordinates
public double[][] coordinates()Returns the value of thecoordinatesrecord component.- Returns:
- the value of the
coordinatesrecord component
-