org.apache.mahout.clustering.canopy
Class Canopy
java.lang.Object
org.apache.mahout.clustering.AbstractCluster
org.apache.mahout.clustering.iterator.DistanceMeasureCluster
org.apache.mahout.clustering.canopy.Canopy
- All Implemented Interfaces:
- org.apache.hadoop.io.Writable, Cluster, Model<VectorWritable>, Parametered
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.
Fields inherited from interface org.apache.mahout.common.parameters.Parametered |
log |
Constructor Summary |
Canopy()
Used for deserialization 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, computeCentroid, computeParameters, createParameters, formatVector, getCenter, getId, getNumObservations, getParameters, getRadius, getS0, getS1, getS2, getTotalObservations, isConverged, observe, observe, observe, observe, observe, setCenter, setId, setNumObservations, setRadius, setS0, setS1, setS2, setTotalObservations |
Canopy
public Canopy()
- Used for deserialization 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 String asFormatString()
toString
public String toString()
- Overrides:
toString
in class Object
getIdentifier
public String getIdentifier()
- Overrides:
getIdentifier
in class DistanceMeasureCluster
Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.