|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mahout.clustering.dirichlet.DirichletCluster
public class DirichletCluster
Field Summary |
---|
Fields inherited from interface org.apache.mahout.clustering.Cluster |
---|
CLUSTERED_POINTS_DIR, CLUSTERS_DIR, INITIAL_CLUSTERS_DIR |
Constructor Summary | |
---|---|
DirichletCluster()
|
|
DirichletCluster(Cluster model)
|
|
DirichletCluster(Cluster model,
double totalCount)
|
Method Summary | |
---|---|
java.lang.String |
asFormatString(java.lang.String[] bindings)
Produce a custom, human-friendly, printable representation of the Cluster. |
java.lang.String |
asJsonString()
Produce a textual representation of the Cluster using Json format. |
void |
computeParameters()
Compute a new set of posterior parameters based upon the Observations that have been observed since my creation |
int |
count()
Return the number of observations that have been observed by this model |
Vector |
getCenter()
Get the "center" of the Cluster as a Vector |
int |
getId()
Get the id of the Cluster |
Cluster |
getModel()
|
int |
getNumPoints()
Get an integer denoting the number of points observed by this cluster |
Vector |
getRadius()
Get the "radius" of the Cluster as a Vector. |
double |
getTotalCount()
|
void |
observe(VectorWritable x)
Observe the given observation, retaining information about it |
double |
pdf(VectorWritable x)
Return the probability that the observation is described by this model |
void |
readFields(java.io.DataInput in)
|
static Cluster |
readModel(java.io.DataInput in)
Reads a typed Model instance from the input stream |
Model<VectorWritable> |
sampleFromPosterior()
|
void |
setModel(Cluster model)
|
void |
write(java.io.DataOutput out)
|
static void |
writeModel(java.io.DataOutput out,
Model<?> model)
Writes a typed Model instance to the output stream |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DirichletCluster(Cluster model, double totalCount)
public DirichletCluster(Cluster model)
public DirichletCluster()
Method Detail |
---|
public Cluster getModel()
public void setModel(Cluster model)
public double getTotalCount()
public void readFields(java.io.DataInput in) throws java.io.IOException
readFields
in interface org.apache.hadoop.io.Writable
java.io.IOException
public void write(java.io.DataOutput out) throws java.io.IOException
write
in interface org.apache.hadoop.io.Writable
java.io.IOException
public static void writeModel(java.io.DataOutput out, Model<?> model) throws java.io.IOException
java.io.IOException
public static Cluster readModel(java.io.DataInput in) throws java.io.IOException
java.io.IOException
public java.lang.String asFormatString(java.lang.String[] bindings)
Cluster
asFormatString
in interface Cluster
bindings
- an optional String[] containing labels used to format the primary Vector/s of this
implementation.
public java.lang.String asJsonString()
Cluster
asJsonString
in interface Cluster
public int getId()
Cluster
getId
in interface Cluster
public Vector getCenter()
Cluster
getCenter
in interface Cluster
public int getNumPoints()
Cluster
getNumPoints
in interface Cluster
public Vector getRadius()
Cluster
getRadius
in interface Cluster
public void computeParameters()
Model
computeParameters
in interface Model<VectorWritable>
public int count()
Model
count
in interface Model<VectorWritable>
public void observe(VectorWritable x)
Model
observe
in interface Model<VectorWritable>
x
- an Observation from the posteriorpublic double pdf(VectorWritable x)
Model
pdf
in interface Model<VectorWritable>
x
- an Observation from the posterior
public Model<VectorWritable> sampleFromPosterior()
sampleFromPosterior
in interface Model<VectorWritable>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |