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

Class LargeViz

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


    public class LargeViz
    extends java.lang.Object
    implements VisualizationTransform
    LargeViz is an algorithm for creating low dimensional embeddings for visualization. It is meant to be faster and better quality than t-SNE without requiring any parameter tuning to get good results. LargeViz is related to t-SNE in how the neighbor graph is constructed, and the perplexity parameter for LargeViz has the same meaning and impact as the perplexity parameter in t-SNE.

    NOTE: The origina LargeViz paper includes a faster scheme for approximately constructing the nearest neighbor graph. This is not yet implemented, but has no negative impact on the quality of the result.
    See: Tang, J., Liu, J., Zhang, M., & Mei, Q. (2016). Visualizing Large-scale and High-dimensional Data. In Proceedings of the 25th International Conference on World Wide Web (pp. 287–297). Republic and Canton of Geneva, Switzerland: International World Wide Web Conferences Steering Committee. doi:10.1145/2872427.2883041
    See Also:
    Serialized Form
    • Constructor Detail

      • LargeViz

        public LargeViz()
    • Method Detail

      • 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, 100] 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
      • setDistanceMetricSource

        public void setDistanceMetricSource(DistanceMetric dm)
        Sets the distance metric to use for the original space. This will determine the target nearest neighbors to keep close to each other in the embedding space
        Parameters:
        dm - the distance metric to use
      • setDistanceMetricEmbedding

        public void setDistanceMetricEmbedding(DistanceMetric dm)
        Sets the distance metric to use for the embedded space. This will determine the actual nearest neighbors as the occur in the embedded space.
        Parameters:
        dm - the distance metric to use
      • setNegativeSamples

        public void setNegativeSamples(int M)
        Sets the number of negative neighbor samples to obtain for each data point. The default recommended value is 5.
        Parameters:
        M - the number of negative samples to use for each update
      • getNegativeSamples

        public int getNegativeSamples()
        Returns:
        the number of negative samples to use for each update
      • setGamma

        public void setGamma(double gamma)
        Gamma controls the negative weight assigned to negative edges in the optimization problem. Large values will place a higher emphasis on separating non-neighbors in the embedded space. The default recommend value is 7.
        Parameters:
        gamma - the weight for negative edge samples
      • getGamma

        public double getGamma()
        Returns:
        the weight for negative edge samples
      • 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.
      • 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.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.