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 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) Returns the options from properties.doubleReturns the value of therepulsionStrengthrecord component.doublespread()Returns the value of thespreadrecord component.Returns the persistent set of hyperparameters.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) Constructor. -
Options
public Options(int k) Constructor.- Parameters:
k- k-nearest neighbor.
-
-
Method Details
-
toProperties
Returns the persistent set of hyperparameters.- Returns:
- the persistent set.
-
of
Returns the options from properties.- Parameters:
props- the hyperparameters.- Returns:
- the 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
-