org.jscience.computing.kmeans
Class KMeans

java.lang.Object
  extended by org.jscience.computing.kmeans.KMeans

public class KMeans
extends java.lang.Object

Generates clusters from a dataset using the K-Means algorithm.

Also contains the main method for running system in test mode.


Constructor Summary
KMeans(DataSet dataset, int numClusters)
          Constructor.
 
Method Summary
 ClusterSet clusters()
           
 int getNumIterations()
          Access the number of iterations that were needed to converge to these clusters.
static void main(java.lang.String[] args)
          A main method for using this in test mode.
static void printUsage()
          Describes the usage of this program.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KMeans

public KMeans(DataSet dataset,
              int numClusters)
Constructor.

Parameters:
dataset - The dataset to cluster.
numCluster - The number of clusters to assume exist.
Method Detail

getNumIterations

public int getNumIterations()
Access the number of iterations that were needed to converge to these clusters.

Returns:
The number of iterations.

clusters

public ClusterSet clusters()
Returns:
The clusters generated by the algorithm.

main

public static void main(java.lang.String[] args)
A main method for using this in test mode.


printUsage

public static void printUsage()
Describes the usage of this program.