Package smile.manifold
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 Summary
ConstructorsConstructorDescriptionOptions
(int d, double perplexity, double eta, double earlyExaggeration, int maxIter) Constructor.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. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecontroller
record component.int
d()
Returns the value of thed
record component.double
Returns the value of theearlyExaggeration
record component.final boolean
Indicates whether some other object is "equal to" this one.double
eta()
Returns the value of theeta
record component.double
Returns the value of thefinalMomentum
record component.final int
hashCode()
Returns a hash code value for this object.int
maxIter()
Returns the value of themaxIter
record component.int
Returns the value of themaxIterWithoutProgress
record component.double
minGain()
Returns the value of theminGain
record component.double
momentum()
Returns the value of themomentum
record component.int
Returns the value of themomentumSwitchIter
record component.static TSNE.Options
of
(Properties props) Returns the options from properties.double
Returns the value of theperplexity
record component.double
tol()
Returns the value of thetol
record component.Returns the persistent set of hyperparameters.final String
toString()
Returns a string representation of this record class.
-
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
Returns the persistent set of hyperparameters.- Returns:
- the persistent set.
-
of
Returns the options from properties.- Parameters:
props
- the hyperparameters.- Returns:
- the options.
-
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. -
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. -
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
d
public int d()Returns the value of thed
record component.- Returns:
- the value of the
d
record component
-
perplexity
public double perplexity()Returns the value of theperplexity
record component.- Returns:
- the value of the
perplexity
record component
-
eta
public double eta()Returns the value of theeta
record component.- Returns:
- the value of the
eta
record component
-
earlyExaggeration
public double earlyExaggeration()Returns the value of theearlyExaggeration
record component.- Returns:
- the value of the
earlyExaggeration
record component
-
maxIter
public int maxIter()Returns the value of themaxIter
record component.- Returns:
- the value of the
maxIter
record component
-
maxIterWithoutProgress
public int maxIterWithoutProgress()Returns the value of themaxIterWithoutProgress
record component.- Returns:
- the value of the
maxIterWithoutProgress
record component
-
tol
public double tol()Returns the value of thetol
record component.- Returns:
- the value of the
tol
record component
-
momentum
public double momentum()Returns the value of themomentum
record component.- Returns:
- the value of the
momentum
record component
-
finalMomentum
public double finalMomentum()Returns the value of thefinalMomentum
record component.- Returns:
- the value of the
finalMomentum
record component
-
momentumSwitchIter
public int momentumSwitchIter()Returns the value of themomentumSwitchIter
record component.- Returns:
- the value of the
momentumSwitchIter
record component
-
minGain
public double minGain()Returns the value of theminGain
record component.- Returns:
- the value of the
minGain
record component
-
controller
Returns the value of thecontroller
record component.- Returns:
- the value of the
controller
record component
-