org.apache.mahout.clustering
Class DistanceMeasureCluster
java.lang.Object
org.apache.mahout.clustering.AbstractCluster
org.apache.mahout.clustering.DistanceMeasureCluster
- All Implemented Interfaces:
- org.apache.hadoop.io.Writable, Cluster, Model<VectorWritable>
- Direct Known Subclasses:
- Canopy, Cluster
public class DistanceMeasureCluster
- extends AbstractCluster
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, toString, wait, wait, wait |
measure
protected DistanceMeasure measure
DistanceMeasureCluster
public DistanceMeasureCluster(Vector point,
int id,
DistanceMeasure measure)
DistanceMeasureCluster
public DistanceMeasureCluster()
readFields
public void readFields(java.io.DataInput in)
throws java.io.IOException
- Specified by:
readFields
in interface org.apache.hadoop.io.Writable
- Overrides:
readFields
in class AbstractCluster
- Throws:
java.io.IOException
write
public void write(java.io.DataOutput out)
throws java.io.IOException
- Specified by:
write
in interface org.apache.hadoop.io.Writable
- Overrides:
write
in class AbstractCluster
- Throws:
java.io.IOException
pdf
public double pdf(VectorWritable vw)
- Description copied from interface:
Model
- Return the probability that the observation is described by this model
- Parameters:
vw
- an Observation from the posterior
- Returns:
- the probability that x is in the receiver
sampleFromPosterior
public Model<VectorWritable> sampleFromPosterior()
- Returns:
- a sample of my posterior model
getMeasure
public DistanceMeasure getMeasure()
setMeasure
public void setMeasure(DistanceMeasure measure)
- Parameters:
measure
- the measure to set
getIdentifier
public java.lang.String getIdentifier()
- Specified by:
getIdentifier
in class AbstractCluster
Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.