## org.apache.mahout.clustering.iterator
Class KMeansClusteringPolicy

    java.lang.Object
      org.apache.mahout.clustering.iterator.AbstractClusteringPolicy
          org.apache.mahout.clustering.iterator.KMeansClusteringPolicy

All Implemented Interfaces:
  org.apache.hadoop.io.Writable, ClusteringPolicy

    public class KMeansClusteringPolicy

extends AbstractClusteringPolicy

This is a simple maximum likelihood clustering policy, suitable for k-means clustering

Constructor Summary
`KMeansClusteringPolicy()`
`KMeansClusteringPolicy(double convergenceDelta)`

Method Summary
`void` `close(ClusterClassifier posterior)` Close the policy using the classifier's models
`void` `readFields(DataInput in)`
`void` `write(DataOutput out)`

Methods inherited from class org.apache.mahout.clustering.iterator.AbstractClusteringPolicy
`classify, select, update`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### KMeansClusteringPolicy

    public KMeansClusteringPolicy()

### KMeansClusteringPolicy

    public KMeansClusteringPolicy(double convergenceDelta)

Method Detail

### write

    public void write(DataOutput out)
               throws IOException

  Specified by:
    `write` in interface `org.apache.hadoop.io.Writable`
  Specified by:
    `write` in class `AbstractClusteringPolicy`
  Throws:
    `IOException`

### readFields

    public void readFields(DataInput in)
                    throws IOException

  Specified by:
    `readFields` in interface `org.apache.hadoop.io.Writable`
  Specified by:
    `readFields` in class `AbstractClusteringPolicy`
  Throws:
    `IOException`

### close

    public void close(ClusterClassifier posterior)

  Description copied from interface: `ClusteringPolicy`
  Close the policy using the classifier's models

  Specified by:
    `close` in interface `ClusteringPolicy`
  Overrides:
    `close` in class `AbstractClusteringPolicy`
  Parameters:
    `posterior` - a posterior ClusterClassifier

Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.