|
||||||||||
| 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
| 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 | |
|---|---|
DirichletCluster()
|
|
DirichletCluster(Cluster model)
|
|
DirichletCluster(Cluster model,
double totalCount)
|
|
| Method Summary | |
|---|---|
String |
asFormatString(String[] bindings)
Produce a custom, human-friendly, printable representation of the Cluster. |
void |
computeParameters()
Compute a new set of posterior parameters based upon the Observations that have been observed since my creation |
void |
configure(org.apache.hadoop.conf.Configuration job)
|
long |
count()
Return the number of observations that have been observed by this model |
void |
createParameters(String prefix,
org.apache.hadoop.conf.Configuration jobConf)
EXPERT: consumers should never have to call this method. |
Vector |
getCenter()
Get the "center" of the Cluster as a Vector |
int |
getId()
Get the id of the Cluster |
Cluster |
getModel()
|
long |
getNumPoints()
Get an integer denoting the number of points observed by this cluster |
Collection<Parameter<?>> |
getParameters()
|
Vector |
getRadius()
Get the "radius" of the Cluster as a Vector. |
double |
getTotalCount()
|
boolean |
isConverged()
|
void |
observe(Model<VectorWritable> x)
Observe the given model, retaining information about its observations |
void |
observe(VectorWritable x)
Observe the given observation, retaining information about it |
void |
observe(VectorWritable x,
double weight)
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(DataInput in)
|
static Cluster |
readModel(DataInput in)
Reads a typed Model instance from the input stream |
Model<VectorWritable> |
sampleFromPosterior()
|
void |
setModel(Cluster model)
|
void |
write(DataOutput out)
|
static void |
writeModel(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 void configure(org.apache.hadoop.conf.Configuration job)
configure in interface Parameteredpublic Collection<Parameter<?>> getParameters()
getParameters in interface Parametered
public void createParameters(String prefix,
org.apache.hadoop.conf.Configuration jobConf)
ParameteredParametered.ParameteredGeneralizations if java supported it. Calling this method should create a new list of
parameters and is called
createParameters in interface Parameteredprefix - ends with a dot if not empty.jobConf - configuration used for retrieving valuesinvoking method,
invoking methodpublic Cluster getModel()
public void setModel(Cluster model)
public double getTotalCount()
public void readFields(DataInput in)
throws IOException
readFields in interface org.apache.hadoop.io.WritableIOException
public void write(DataOutput out)
throws IOException
write in interface org.apache.hadoop.io.WritableIOException
public static void writeModel(DataOutput out,
Model<?> model)
throws IOException
IOException
public static Cluster readModel(DataInput in)
throws IOException
IOExceptionpublic String asFormatString(String[] bindings)
Cluster
asFormatString in interface Clusterbindings - an optional String[] containing labels used to format the primary
Vector/s of this implementation.
public int getId()
Cluster
getId in interface Clusterpublic Vector getCenter()
Cluster
getCenter in interface Clusterpublic long getNumPoints()
Cluster
getNumPoints in interface Clusterpublic Vector getRadius()
Cluster
getRadius in interface Clusterpublic void computeParameters()
Model
computeParameters in interface Model<VectorWritable>public long 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>
public void observe(VectorWritable x,
double weight)
Model
observe in interface Model<VectorWritable>x - an Observation from the posteriorweight - a double weighting factorpublic boolean isConverged()
isConverged in interface Clusterpublic void observe(Model<VectorWritable> x)
Model
observe in interface Model<VectorWritable>x - a Model<0>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||