org.apache.mahout.clustering.iterator
Class DistanceMeasureCluster

java.lang.Object
  extended by org.apache.mahout.clustering.AbstractCluster
      extended by org.apache.mahout.clustering.iterator.DistanceMeasureCluster
All Implemented Interfaces:
org.apache.hadoop.io.Writable, Cluster, Model<VectorWritable>, Parametered
Direct Known Subclasses:
Canopy, Kluster

public class DistanceMeasureCluster
extends AbstractCluster


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
DistanceMeasureCluster()
           
DistanceMeasureCluster(Vector point, int id, DistanceMeasure measure)
           
 
Method Summary
 void configure(org.apache.hadoop.conf.Configuration job)
           
 String getIdentifier()
           
 DistanceMeasure getMeasure()
           
 double pdf(VectorWritable vw)
          Return the probability that the observation is described by this model
 void readFields(DataInput in)
           
 Model<VectorWritable> sampleFromPosterior()
           
 void setMeasure(DistanceMeasure measure)
           
 void write(DataOutput out)
           
 
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, toString, wait, wait, wait
 

Constructor Detail

DistanceMeasureCluster

public DistanceMeasureCluster(Vector point,
                              int id,
                              DistanceMeasure measure)

DistanceMeasureCluster

public DistanceMeasureCluster()
Method Detail

configure

public void configure(org.apache.hadoop.conf.Configuration job)
Specified by:
configure in interface Parametered
Overrides:
configure in class AbstractCluster

readFields

public void readFields(DataInput in)
                throws IOException
Specified by:
readFields in interface org.apache.hadoop.io.Writable
Overrides:
readFields in class AbstractCluster
Throws:
IOException

write

public void write(DataOutput out)
           throws IOException
Specified by:
write in interface org.apache.hadoop.io.Writable
Overrides:
write in class AbstractCluster
Throws:
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 String getIdentifier()
Specified by:
getIdentifier in class AbstractCluster


Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.