Record Class UMAP.Options

java.lang.Object
java.lang.Record
smile.manifold.UMAP.Options
Record Components:
k - k-nearest neighbors. Larger values result in more global views of the manifold, while smaller values result in more local data being preserved. Generally in the range 2 to 100.
d - The target embedding dimensions. defaults to 2 to provide easy visualization, but can reasonably be set to any integer value in the range 2 to 100.
epochs - The number of iterations to optimize the low-dimensional representation. Larger values result in more accurate embedding. Muse be at least 10. Choose wise value based on the size of the input data, e.g, 200 for large data (1000+ samples), 500 for small.
learningRate - The initial learning rate for the embedding optimization, default 1.
minDist - The desired separation between close points in the embedding space. Smaller values will result in a more clustered/clumped embedding where nearby points on the manifold are drawn closer together, while larger values will result on a more even disperse of points. The value should be set no-greater than and relative to the spread value, which determines the scale at which embedded points will be spread out. default 0.1.
spread - The effective scale of embedded points. In combination with minDist, this determines how clustered/clumped the embedded points are. default 1.0.
negativeSamples - The number of negative samples to select per positive sample in the optimization process. Increasing this value will result in greater repulsive force being applied, greater optimization cost, but slightly more accuracy, default 5.
repulsionStrength - Weighting applied to negative samples in low dimensional embedding optimization. Values higher than one will result in greater weight being given to negative samples, default 1.0.
localConnectivity - The local connectivity required. That is, the number of nearest neighbors that should be assumed to be connected at a local level. The higher this value the more connected the manifold becomes locally. In practice this should be not more than the local intrinsic dimension of the manifold.
Enclosing class:
UMAP

public static record UMAP.Options(int k, int d, int epochs, double learningRate, double minDist, double spread, int negativeSamples, double repulsionStrength, double localConnectivity) extends Record
The UMAP hyperparameters.
  • Constructor Details

    • Options

      public Options(int k, int d, int epochs, double learningRate, double minDist, double spread, int negativeSamples, double repulsionStrength, double localConnectivity)
      Constructor.
    • Options

      public Options(int k)
      Constructor.
      Parameters:
      k - k-nearest neighbor.
  • Method Details

    • toProperties

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

      public static UMAP.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. All components in this record class 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.
    • k

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

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

      public int epochs()
      Returns the value of the epochs record component.
      Returns:
      the value of the epochs record component
    • learningRate

      public double learningRate()
      Returns the value of the learningRate record component.
      Returns:
      the value of the learningRate record component
    • minDist

      public double minDist()
      Returns the value of the minDist record component.
      Returns:
      the value of the minDist record component
    • spread

      public double spread()
      Returns the value of the spread record component.
      Returns:
      the value of the spread record component
    • negativeSamples

      public int negativeSamples()
      Returns the value of the negativeSamples record component.
      Returns:
      the value of the negativeSamples record component
    • repulsionStrength

      public double repulsionStrength()
      Returns the value of the repulsionStrength record component.
      Returns:
      the value of the repulsionStrength record component
    • localConnectivity

      public double localConnectivity()
      Returns the value of the localConnectivity record component.
      Returns:
      the value of the localConnectivity record component