Documentation of 'jsat.datatransform.visualization.MDS' Java class
MDS
jsat.datatransform.visualization

Class MDS

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, VisualizationTransform


    public class MDS
    extends java.lang.Object
    implements VisualizationTransform
    Multidimensional scaling is an algorithm for finding low dimensional embeddings of arbitrary distance matrices. MDS will attempt to find an embedding that maintains the same pair-wise distances between all items in the distance matrix. MDS is a non-convex problem, so different runs can produce different results.

    MDS can be used on arbitrary dissimilarity matrices by calling #transform(jsat.linear.Matrix, java.util.concurrent.ExecutorService) .
    See Also:
    Serialized Form
    • Constructor Detail

      • MDS

        public MDS()
    • Method Detail

      • setTolerance

        public void setTolerance(double tolerance)
        Sets the tolerance parameter for determining convergence.
        Parameters:
        tolerance - the tolerance for declaring convergence
      • getTolerance

        public double getTolerance()
        Returns:
        the tolerance parameter
      • setEmbeddingMetric

        public void setEmbeddingMetric(DistanceMetric embedMetric)
        Sets the distance metric to use when creating the initial dissimilarity matrix of a new dataset. By default the Euclidean distance is used, but any distance may be substituted.The chosen distance need not be a valid metric, its only requirement is symmetry.
        Parameters:
        embedMetric - the distance metric to use when creating the dissimilarity matrix.
      • getEmbeddingMetric

        public DistanceMetric getEmbeddingMetric()
        Returns:
        the distance metric used when creating a dissimilarity matrix
      • transform

        public <Type extends DataSet> Type transform(DataSet<Type> d,
                                                     boolean parallel)
        Description copied from interface: VisualizationTransform
        Transforms the given data set, returning a dataset of the same type.
        Specified by:
        transform in interface VisualizationTransform
        Type Parameters:
        Type - the dataset type
        Parameters:
        d - the data set to transform
        parallel - true if transform should be done in parallel, or false if it should use a single thread.
        Returns:
        the lower dimension dataset for visualization.
      • setTargetDimension

        public boolean setTargetDimension(int target)
        Description copied from interface: VisualizationTransform
        Sets the target dimension to embed new dataset to. Many visualization methods may only support a target of 2 or 3 dimensions, or only one of those options. For that reason a boolean value will be returned indicating if the target size was acceptable. If not, no change to the object will occur.
        Specified by:
        setTargetDimension in interface VisualizationTransform
        Parameters:
        target - the new target dimension size when VisualizationTransform.transform(jsat.DataSet) is called.
        Returns:
        true if this transform supports that dimension and it was set, false if the target dimension is unsupported and the previous value will be used instead.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.