|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mahout.clustering.dirichlet.models.L1Model
public class L1Model
Field Summary |
---|
Fields inherited from interface org.apache.mahout.clustering.Cluster |
---|
CLUSTERED_POINTS_DIR, CLUSTERS_DIR, INITIAL_CLUSTERS_DIR |
Constructor Summary | |
---|---|
L1Model()
|
|
L1Model(int id,
Vector v)
|
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 |
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. |
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)
|
L1Model |
sampleFromPosterior()
|
java.lang.String |
toString()
|
void |
write(java.io.DataOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public L1Model()
public L1Model(int id, Vector v)
Method Detail |
---|
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 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 L1Model sampleFromPosterior()
sampleFromPosterior
in interface Model<VectorWritable>
public java.lang.String toString()
toString
in class java.lang.Object
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 Vector getCenter()
Cluster
getCenter
in interface Cluster
public int getId()
Cluster
getId
in interface Cluster
public int getNumPoints()
Cluster
getNumPoints
in interface Cluster
public Vector getRadius()
Cluster
getRadius
in interface Cluster
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |