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 -
Method Summary
Modifier and TypeMethodDescriptionintd()Returns the value of thedrecord component.intepochs()Returns the value of theepochsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intk()Returns the value of thekrecord component.doubleReturns the value of thelearningRaterecord component.doubleReturns the value of thelocalConnectivityrecord component.doubleminDist()Returns the value of theminDistrecord component.intReturns the value of thenegativeSamplesrecord component.static UMAP.Optionsof(Properties props) Parses hyperparameters from a Properties instance.doubleReturns the value of therepulsionStrengthrecord component.doublespread()Returns the value of thespreadrecord component.Returns hyperparameters as a Properties object.final StringtoString()Returns a string representation of this record class.
-
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
Returns hyperparameters as a Properties object.- Returns:
- the hyperparameters properties.
-
of
Parses hyperparameters from a Properties instance.- Parameters:
props- configuration properties.- Returns:
- the parsed Options.
-
toString
-
hashCode
-
equals
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 thecomparemethod from their corresponding wrapper classes. -
k
-
d
-
epochs
-
learningRate
public double learningRate()Returns the value of thelearningRaterecord component.- Returns:
- the value of the
learningRaterecord component
-
minDist
-
spread
-
negativeSamples
public int negativeSamples()Returns the value of thenegativeSamplesrecord component.- Returns:
- the value of the
negativeSamplesrecord component
-
repulsionStrength
public double repulsionStrength()Returns the value of therepulsionStrengthrecord component.- Returns:
- the value of the
repulsionStrengthrecord component
-
localConnectivity
public double localConnectivity()Returns the value of thelocalConnectivityrecord component.- Returns:
- the value of the
localConnectivityrecord component
-