Package smile.clustering
Record Class DeterministicAnnealing.Options
java.lang.Object
java.lang.Record
smile.clustering.DeterministicAnnealing.Options
- Record Components:
kmax
- the maximum number of clusters.alpha
- the temperature T is decreasing as T = T * alpha. alpha has to be in (0, 1).maxIter
- the maximum number of iterations at each temperature.tol
- the tolerance of convergence test.splitTol
- the tolerance to split a cluster.controller
- the optional training controller.
- Enclosing class:
DeterministicAnnealing
public static record DeterministicAnnealing.Options(int kmax, double alpha, int maxIter, double tol, double splitTol, IterativeAlgorithmController<AlgoStatus> controller)
extends Record
Deterministic annealing hyperparameters.
-
Constructor Summary
ConstructorsConstructorDescriptionOptions
(int kmax, double alpha, int maxIter) Constructor.Options
(int kmax, double alpha, int maxIter, double tol, double splitTol, IterativeAlgorithmController<AlgoStatus> controller) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiondouble
alpha()
Returns the value of thealpha
record component.Returns the value of thecontroller
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
kmax()
Returns the value of thekmax
record component.int
maxIter()
Returns the value of themaxIter
record component.of
(Properties props) Returns the options from properties.double
splitTol()
Returns the value of thesplitTol
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 kmax, double alpha, int maxIter, double tol, double splitTol, IterativeAlgorithmController<AlgoStatus> controller) Constructor. -
Options
public Options(int kmax, double alpha, int maxIter) Constructor.- Parameters:
kmax
- the maximum number of clusters.alpha
- the temperature T is decreasing as T = T * alpha. alpha has to be in (0, 1).maxIter
- the maximum number of iterations at each temperature.
-
-
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 '=='. -
kmax
public int kmax()Returns the value of thekmax
record component.- Returns:
- the value of the
kmax
record component
-
alpha
public double alpha()Returns the value of thealpha
record component.- Returns:
- the value of the
alpha
record component
-
maxIter
public int maxIter()Returns the value of themaxIter
record component.- Returns:
- the value of the
maxIter
record component
-
tol
public double tol()Returns the value of thetol
record component.- Returns:
- the value of the
tol
record component
-
splitTol
public double splitTol()Returns the value of thesplitTol
record component.- Returns:
- the value of the
splitTol
record component
-
controller
Returns the value of thecontroller
record component.- Returns:
- the value of the
controller
record component
-