org.apache.mahout.clustering.dirichlet.models
Class AsymmetricSampledNormalModel

java.lang.Object
  extended by org.apache.mahout.clustering.dirichlet.models.AsymmetricSampledNormalModel
All Implemented Interfaces:
org.apache.hadoop.io.Writable, Model<VectorWritable>, Printable

public class AsymmetricSampledNormalModel
extends java.lang.Object
implements Model<VectorWritable>


Constructor Summary
AsymmetricSampledNormalModel()
           
AsymmetricSampledNormalModel(Vector mean, Vector stdDev)
           
 
Method Summary
 java.lang.String asFormatString(java.lang.String[] bindings)
          Produce a custom, printable representation of the receiver.
 java.lang.String asJsonString()
          Produce a printable representation of the receiver using Json.
 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 getMean()
           
 Vector getStdDev()
           
 void observe(VectorWritable v)
          Observe the given observation, retaining information about it
 double pdf(VectorWritable v)
          Return the probability that the observation is described by this model
 void readFields(java.io.DataInput in)
           
 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

AsymmetricSampledNormalModel

public AsymmetricSampledNormalModel()

AsymmetricSampledNormalModel

public AsymmetricSampledNormalModel(Vector mean,
                                    Vector stdDev)
Method Detail

getMean

public Vector getMean()

getStdDev

public Vector getStdDev()

observe

public void observe(VectorWritable v)
Description copied from interface: Model
Observe the given observation, retaining information about it

Specified by:
observe in interface Model<VectorWritable>
Parameters:
v - an Observation from the posterior

computeParameters

public void computeParameters()
Description copied from interface: Model
Compute a new set of posterior parameters based upon the Observations that have been observed since my creation

Specified by:
computeParameters in interface Model<VectorWritable>

pdf

public double pdf(VectorWritable v)
Description copied from interface: Model
Return the probability that the observation is described by this model

Specified by:
pdf in interface Model<VectorWritable>
Parameters:
v - an Observation from the posterior
Returns:
the probability that x is in the receiver

count

public int count()
Description copied from interface: Model
Return the number of observations that have been observed by this model

Specified by:
count in interface Model<VectorWritable>
Returns:
an int

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

asFormatString

public java.lang.String asFormatString(java.lang.String[] bindings)
Description copied from interface: Printable
Produce a custom, printable representation of the receiver.

Specified by:
asFormatString in interface Printable
Parameters:
bindings - an optional String[] containing labels used to format the primary Vector/s of this implementation.
Returns:
a String

readFields

public void readFields(java.io.DataInput in)
                throws java.io.IOException
Specified by:
readFields in interface org.apache.hadoop.io.Writable
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
Throws:
java.io.IOException

asJsonString

public java.lang.String asJsonString()
Description copied from interface: Printable
Produce a printable representation of the receiver using Json. (Label bindings are transient and not part of the Json representation)

Specified by:
asJsonString in interface Printable
Returns:
a Json String


Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.