Record Class TSNE.Options

java.lang.Object
java.lang.Record
smile.manifold.TSNE.Options
Record Components:
d - the dimension of embedding space.
perplexity - the perplexity of the conditional distribution. The perplexity is related to the number of nearest neighbors that is used in other manifold learning algorithms. Consider selecting a value between 5 and 50. Different values can result in significantly different results. The perplexity must be less than the number of samples.
eta - the learning rate. Usually in the range [10.0, 1000.0]. If the learning rate is too high, the data may look like a "ball" with any point approximately equidistant from its nearest neighbours. If the learning rate is too low, most points may look compressed in a dense cloud with few outliers.
earlyExaggeration - Controls how tight natural clusters in the original space are in the embedded space and how much space will be between them. For larger values, the space between natural clusters will be larger in the embedded space. The choice of this parameter is not very critical. If the cost function increases during initial optimization, the early exaggeration factor or the learning rate might be too high.
maxIter - the maximum number of iterations. Should be at least 250.
maxIterWithoutProgress - Maximum number of iterations without progress before aborting the optimization.
tol - the tolerance of convergence test.
momentum - the momentum factor.
finalMomentum - the momentum in later stage.
momentumSwitchIter - the number of iterations at which switch the momentum to finalMomentum.
minGain - the floor of gain.
controller - the optional training controller.
Enclosing class:
TSNE

public static record TSNE.Options(int d, double perplexity, double eta, double earlyExaggeration, int maxIter, int maxIterWithoutProgress, double tol, double momentum, double finalMomentum, int momentumSwitchIter, double minGain, IterativeAlgorithmController<AlgoStatus> controller) extends Record
The t-SNE hyperparameters.
  • Constructor Details

    • Options

      public Options(int d, double perplexity, double eta, double earlyExaggeration, int maxIter, int maxIterWithoutProgress, double tol, double momentum, double finalMomentum, int momentumSwitchIter, double minGain, IterativeAlgorithmController<AlgoStatus> controller)
      Constructor.
    • Options

      public Options(int d, double perplexity, double eta, double earlyExaggeration, int maxIter)
      Constructor.
      Parameters:
      d - the dimension of embedding space.
      perplexity - the perplexity of the conditional distribution. The perplexity is related to the number of nearest neighbors that is used in other manifold learning algorithms.
      eta - the learning rate. Usually in the range [10.0, 1000.0]. If the learning rate is too high, the data may look like a "ball" with any point approximately equidistant from its nearest neighbours. If the learning rate is too low, most points may look compressed in a dense cloud with few outliers.
      earlyExaggeration - Controls how tight natural clusters in the original space are in the embedded space and how much space will be between them. For larger values, the space between natural clusters will be larger in the embedded space. The choice of this parameter is not very critical. If the cost function increases during initial optimization, the early exaggeration factor or the learning rate might be too high.
      maxIter - the maximum number of iterations. Should be at least 250.
  • Method Details

    • toProperties

      public Properties toProperties()
      Returns the persistent set of hyperparameters.
      Returns:
      the persistent set.
    • of

      public static TSNE.Options of(Properties props)
      Returns the options from properties.
      Parameters:
      props - the hyperparameters.
      Returns:
      the options.
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • d

      public int d()
      Returns the value of the d record component.
      Returns:
      the value of the d record component
    • perplexity

      public double perplexity()
      Returns the value of the perplexity record component.
      Returns:
      the value of the perplexity record component
    • eta

      public double eta()
      Returns the value of the eta record component.
      Returns:
      the value of the eta record component
    • earlyExaggeration

      public double earlyExaggeration()
      Returns the value of the earlyExaggeration record component.
      Returns:
      the value of the earlyExaggeration record component
    • maxIter

      public int maxIter()
      Returns the value of the maxIter record component.
      Returns:
      the value of the maxIter record component
    • maxIterWithoutProgress

      public int maxIterWithoutProgress()
      Returns the value of the maxIterWithoutProgress record component.
      Returns:
      the value of the maxIterWithoutProgress record component
    • tol

      public double tol()
      Returns the value of the tol record component.
      Returns:
      the value of the tol record component
    • momentum

      public double momentum()
      Returns the value of the momentum record component.
      Returns:
      the value of the momentum record component
    • finalMomentum

      public double finalMomentum()
      Returns the value of the finalMomentum record component.
      Returns:
      the value of the finalMomentum record component
    • momentumSwitchIter

      public int momentumSwitchIter()
      Returns the value of the momentumSwitchIter record component.
      Returns:
      the value of the momentumSwitchIter record component
    • minGain

      public double minGain()
      Returns the value of the minGain record component.
      Returns:
      the value of the minGain record component
    • controller

      Returns the value of the controller record component.
      Returns:
      the value of the controller record component