Record Class UMAP.Options

java.lang.Object
java.lang.Record
smile.manifold.UMAP.Options
Record Components:
k - the number of nearest neighbors for local metric computation.
d - the target embedding dimensionality.
epochs - the number of optimization epochs.
learningRate - the initial learning rate for stochastic gradient descent.
minDist - the effective minimum distance between embedded points.
spread - the effective scale of embedded points.
negativeSamples - the count of negative samples drawn per positive edge sample.
repulsionStrength - weighting factor applied to negative sample repulsion.
localConnectivity - the number of nearest neighbors assumed to be locally connected.
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
UMAP hyperparameters.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Options(int k)
    Constructor with default parameters for a given neighborhood size k.
    Options(int k, int d, int epochs, double learningRate, double minDist, double spread, int negativeSamples, double repulsionStrength, double localConnectivity)
    Validates hyperparameter values.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    d()
    Returns the value of the d record component.
    int
    Returns the value of the epochs record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    int
    k()
    Returns the value of the k record component.
    double
    Returns the value of the learningRate record component.
    double
    Returns the value of the localConnectivity record component.
    double
    Returns the value of the minDist record component.
    int
    Returns the value of the negativeSamples record component.
    of(Properties props)
    Parses hyperparameters from a Properties instance.
    double
    Returns the value of the repulsionStrength record component.
    double
    Returns the value of the spread record component.
    Returns hyperparameters as a Properties object.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Options

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

      public Options(int k)
      Constructor with default parameters for a given neighborhood size k.
      Parameters:
      k - the number of nearest neighbors.
  • Method Details

    • toProperties

      public Properties toProperties()
      Returns hyperparameters as a Properties object.
      Returns:
      the hyperparameters properties.
    • of

      public static UMAP.Options of(Properties props)
      Parses hyperparameters from a Properties instance.
      Parameters:
      props - configuration properties.
      Returns:
      the parsed 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 the compare method from their corresponding wrapper classes.
      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