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

Class TSNE

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


    public class TSNE
    extends java.lang.Object
    implements VisualizationTransform
    t-distributed Stochastic Neighbor Embedding is an algorithm for creating low dimensional embeddings of datasets, for the purpose of visualization. It attempts to keep points that are near each other in the original space near each other in the low dimensional space as well, with less emphasis on maintaining far-away relationships in the data. This implementation uses the approximated gradients to learn the embedding in O(n log n) time.

    If the input dataset has a dimension greater than 50, it is advisable to project the data set down to 50 dimensions using PCA or some similar technique.

    See:
    • Maaten, L. Van Der, & Hinton, G. (2008). Visualizing Data using t-SNE. Journal of Machine Learning Research, 9, 2579–2605.
    • Van der Maaten, L. (2014). Accelerating t-SNE using Tree-Based Algorithms. Journal of Machine Learning Research, 15, 3221–3245. Retrieved from here
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      TSNE() 
    • Constructor Detail

      • TSNE

        public TSNE()
    • Method Detail

      • setAlpha

        public void setAlpha(double alpha)
        α is the "early exaggeration" constant. It is a multiple applied to part of the gradient for th first quarter of iterations, and can improve the quality of the solution found. A value in the range of [4, 20] is recommended.
        Parameters:
        alpha - the exaggeration constant
      • getAlpha

        public double getAlpha()
        Returns:
        the "early exaggeration" constant
      • setPerplexity

        public void setPerplexity(double perplexity)
        Sets the target perplexity of the gaussian used over each data point. The perplexity can be thought of as a quasi desired number of nearest neighbors to be considered, but is adapted based on the distribution of the data. Increasing the perplexity can increase the amount of time it takes to get an embedding. Using a value in the range of [5, 50] is recommended.
        Parameters:
        perplexity - the quasi number of neighbors to consider for each data point
      • getPerplexity

        public double getPerplexity()
        Returns:
        the target perplexity to use for each data point
      • setIterations

        public void setIterations(int T)
        Sets the desired number of gradient descent iterations to perform.
        Parameters:
        T - the number of gradient descent iterations
      • getIterations

        public int getIterations()
        Returns:
        the number of gradient descent iterations to perform
      • 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.