org.apache.mahout.clustering
Interface Cluster
- All Superinterfaces:
- Model<VectorWritable>, Parametered, org.apache.hadoop.io.Writable
- All Known Implementing Classes:
- AbstractCluster, Canopy, Cluster, DirichletCluster, DistanceMeasureCluster, GaussianCluster, MeanShiftCanopy, 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
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 |
long |
getNumPoints()
Get an integer denoting the number of points observed by this cluster |
Vector |
getRadius()
Get the "radius" of the Cluster as a Vector. |
Methods inherited from interface org.apache.hadoop.io.Writable |
readFields, write |
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
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
getNumPoints
long getNumPoints()
- Get an integer denoting the number of points observed by this cluster
- Returns:
- an integer
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
Copyright © 2008-2011 The Apache Software Foundation. All Rights Reserved.