## 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.

Nested Class Summary

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

Field Summary

Fields inherited from interface org.apache.mahout.clustering.Cluster
`CLUSTERED_POINTS_DIR, CLUSTERS_DIR, FINAL_ITERATION_SUFFIX, INITIAL_CLUSTERS_DIR`

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

Method Summary
`String` `asFormatString()`
`String` `getIdentifier()`
`String` `toString()`

Methods inherited from class org.apache.mahout.clustering.iterator.DistanceMeasureCluster
`configure, getMeasure, pdf, readFields, sampleFromPosterior, setMeasure, write`

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`

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

Constructor Detail

### 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 space
    `canopyId` - an int identifying the canopy local to this process only
    `measure` - a DistanceMeasure to use

Method Detail

### 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.