## org.apache.mahout.clustering
Interface Cluster

All Superinterfaces:
  Model<VectorWritable>, Parametered, org.apache.hadoop.io.Writable

All Known Implementing Classes:
  AbstractCluster, Canopy, DistanceMeasureCluster, Kluster, SoftCluster

    public interface Cluster

extends Model<VectorWritable>, Parametered

Implementations of this interface have a printable representation and certain attributes that are common across all clustering implementations

Nested Class Summary

Nested classes/interfaces inherited from interface org.apache.mahout.common.parameters.Parametered
`Parametered.ParameteredGeneralizations`

Field Summary
`static String` `CLUSTERED_POINTS_DIR`
`static String` `CLUSTERS_DIR`
`static String` `FINAL_ITERATION_SUFFIX`
`static String` `INITIAL_CLUSTERS_DIR`

Fields inherited from interface org.apache.mahout.common.parameters.Parametered
`log`

Method Summary
`String` `asFormatString(String[] bindings)` Produce a custom, human-friendly, printable representation of the Cluster.
`Vector` `getCenter()` Get the "center" of the Cluster as a Vector
`int` `getId()` Get the id of the Cluster
`Vector` `getRadius()` Get the "radius" of the Cluster as a Vector.
`boolean` `isConverged()`

Methods inherited from interface org.apache.mahout.clustering.Model
`computeParameters, getNumObservations, getTotalObservations, observe, observe, observe, pdf, sampleFromPosterior`

Methods inherited from interface org.apache.hadoop.io.Writable
`readFields, write`

Methods inherited from interface org.apache.mahout.common.parameters.Parametered
`configure, createParameters, getParameters`

Field Detail

### CLUSTERED_POINTS_DIR

    static final String CLUSTERED_POINTS_DIR

See Also:
  Constant Field Values

### INITIAL_CLUSTERS_DIR

    static final String INITIAL_CLUSTERS_DIR

See Also:
  Constant Field Values

### CLUSTERS_DIR

    static final String CLUSTERS_DIR

See Also:
  Constant Field Values

### FINAL_ITERATION_SUFFIX

    static final String FINAL_ITERATION_SUFFIX

See Also:
  Constant Field Values

Method Detail

### getId

    int getId()

  Get the id of the Cluster

  Returns:
    a unique integer

### getCenter

    Vector getCenter()

  Get the "center" of the Cluster as a Vector

  Returns:
    a Vector

### getRadius

    Vector getRadius()

  Get the "radius" of the Cluster as a Vector. Usually the radius is the standard deviation expressed as a Vector of size equal to the center. Some clusters may return zero values if not appropriate.

  Returns:
    aVector

### asFormatString

    String asFormatString(String[] bindings)

  Produce a custom, human-friendly, printable representation of the Cluster.

  Parameters:
    `bindings` - an optional String[] containing labels used to format the primary Vector/s of this implementation.
  Returns:
    a String

### isConverged

    boolean isConverged()

  Returns:
    if the receiver has converged, or false if that has no meaning for the implementation

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