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.
-
Constructor Summary
ConstructorDescriptionIsotonicMDS
(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.final int
hashCode()
Returns a hash code value for this object.static IsotonicMDS
of
(double[][] proximity) Fits Kruskal's non-metric MDS with default k = 2, tolerance = 1E-4 and maxIter = 200.static IsotonicMDS
of
(double[][] proximity, double[][] init, double tol, int maxIter) Fits Kruskal's non-metric MDS.static IsotonicMDS
of
(double[][] proximity, int k) Fits Kruskal's non-metric MDS.static IsotonicMDS
of
(double[][] proximity, int k, double tol, int maxIter) Fits Kruskal's non-metric MDS.static IsotonicMDS
of
(double[][] proximity, Properties params) Fits Kruskal's non-metric MDS.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
-
of
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
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
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
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
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.
-
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
-