org.apache.mahout.clustering.canopy
Class Canopy
java.lang.Object
org.apache.mahout.clustering.AbstractCluster
org.apache.mahout.clustering.DistanceMeasureCluster
org.apache.mahout.clustering.canopy.Canopy
- All Implemented Interfaces:
- org.apache.hadoop.io.Writable, Cluster, Model<VectorWritable>
public class Canopy
- extends DistanceMeasureCluster
This class models a canopy as a center point, the number of points that are contained within it according
to the application of some distance metric, and a point total which is the sum of all the points and is
used to compute the centroid when needed.
Constructor Summary |
Canopy()
Used for deserializaztion as a writable |
Canopy(Vector center,
int canopyId,
DistanceMeasure measure)
Create a new Canopy containing the given point and canopyId |
Methods inherited from class org.apache.mahout.clustering.AbstractCluster |
asFormatString, asJsonString, computeCentroid, computeParameters, count, formatVector, getCenter, getId, getNumPoints, getObservations, getRadius, getS0, getS1, getS2, observe, observe, observe, observe, setCenter, setId, setNumPoints, setRadius |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Canopy
public Canopy()
- Used for deserializaztion as a writable
Canopy
public Canopy(Vector center,
int canopyId,
DistanceMeasure measure)
- Create a new Canopy containing the given point and canopyId
- Parameters:
center
- a point in vector spacecanopyId
- an int identifying the canopy local to this process onlymeasure
- a DistanceMeasure to use
asFormatString
public java.lang.String asFormatString()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getIdentifier
public java.lang.String getIdentifier()
- Overrides:
getIdentifier
in class DistanceMeasureCluster
Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.