javax.datamining.algorithm.kmeans
Interface KMeansSettings

All Superinterfaces:
AlgorithmSettings, ClusteringAlgorithmSettings

public interface KMeansSettings
extends ClusteringAlgorithmSettings

A KMeansSettings object captures the parameters associated with the k-means clustering algorithm. It allows a knowledgeable user to fine tune algorithm parameters. Generally, not all parameters must be specified, however, those specified are taken into account by the underlying data mining system. The value k is set by invoking setMaxNumberOfClusters(clusters : int) method defined in ClusteringSettings.

Author:
JSR-73 Java Data Mining Expert Group
See Also:
AlgorithmSettings, ClusteringAlgorithmSettings

Method Summary
 ClusteringDistanceFunction getDistanceFunction()
          Returns the distance function to be used for training a k-means clustering model.
 int getMaxNumberOfIterations()
          Returns the maximum number of iterations to train a k-means clustering model.
 double getMinErrorTolerance()
          Returns the minimum error tolerance to train a k-means clustering model.
 void setDistanceFunction(ClusteringDistanceFunction distanceFunction)
          Sets the distance function to be used to train a k-means clustering model.
 void setMaxNumberOfIterations(int maxIterations)
          Sets the maximum number of interations while training a k-means clustering model.
 void setMinErrorTolerance(double minErrorTolerance)
          Sets the minimum percentual change in error between iterations to consider that the clusters have converged.
 
Methods inherited from interface javax.datamining.base.AlgorithmSettings
getMiningAlgorithm, verify
 

Method Detail

getDistanceFunction

public ClusteringDistanceFunction getDistanceFunction()
Returns the distance function to be used for training a k-means clustering model.

Returns:
ClusteringDistanceFunction

getMaxNumberOfIterations

public int getMaxNumberOfIterations()
Returns the maximum number of iterations to train a k-means clustering model.

Returns:
int

getMinErrorTolerance

public double getMinErrorTolerance()
Returns the minimum error tolerance to train a k-means clustering model.

Returns:
double

setDistanceFunction

public void setDistanceFunction(ClusteringDistanceFunction distanceFunction)
Sets the distance function to be used to train a k-means clustering model. If null is specified, then the default distance function is used.

Parameters:
distanceFunction - The distance function to be used for training k-means clusters.
Returns:
void

setMaxNumberOfIterations

public void setMaxNumberOfIterations(int maxIterations)
Sets the maximum number of interations while training a k-means clustering model. The maximum iterations must be a positive integer.

Parameters:
maxIterations - The maximum number of iterations.
Returns:
void

setMinErrorTolerance

public void setMinErrorTolerance(double minErrorTolerance)
Sets the minimum percentual change in error between iterations to consider that the clusters have converged. The minimum error tolerance must be a non-negative number that is less than 1.

Parameters:
minErrorTolerance - The minimum percentual change in error between iterations.
Returns:
void