Package smile.clustering
Class DeterministicAnnealing
java.lang.Object
smile.clustering.DeterministicAnnealing
Deterministic annealing clustering. Deterministic annealing extends
soft-clustering to an annealing process.
For each temperature value, the algorithm iterates between the calculation
of all posteriori probabilities and the update of the centroids vectors,
until convergence is reached. The annealing starts with a high temperature.
Here, all centroids vectors converge to the center of the pattern
distribution (independent of their initial positions). Below a critical
temperature the vectors start to split. Further decreasing the temperature
leads to more splittings until all centroids vectors are separate. The
annealing can therefore avoid (if it is sufficiently slow) the convergence
to local minima.
References
- Kenneth Rose. Deterministic Annealing for Clustering, Compression, Classification, Regression, and Speech Recognition.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
Deterministic annealing hyperparameters. -
Method Summary
Modifier and TypeMethodDescriptionstatic CentroidClustering
<double[], double[]> fit
(double[][] data, int kmax, double alpha, int maxIter) Clustering data into k clusters.static CentroidClustering
<double[], double[]> fit
(double[][] data, DeterministicAnnealing.Options options) Clustering data into k clusters.
-
Method Details
-
fit
public static CentroidClustering<double[],double[]> fit(double[][] data, int kmax, double alpha, int maxIter) Clustering data into k clusters.- Parameters:
data
- the input data of which each row is an observation.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.- Returns:
- the model.
-
fit
public static CentroidClustering<double[],double[]> fit(double[][] data, DeterministicAnnealing.Options options) Clustering data into k clusters.- Parameters:
data
- the input data of which each row is an observation.options
- the hyperparameters.- Returns:
- the model.
-