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

java.lang.Object
  extended by org.apache.mahout.clustering.dirichlet.models.VectorModelDistribution
      extended by org.apache.mahout.clustering.dirichlet.models.NormalModelDistribution
          extended by org.apache.mahout.clustering.dirichlet.models.SampledNormalDistribution
All Implemented Interfaces:
ModelDistribution<VectorWritable>

public class SampledNormalDistribution
extends NormalModelDistribution

An implementation of the ModelDistribution interface suitable for testing the DirichletCluster algorithm. Uses a Normal Distribution to sample the prior model values.


Constructor Summary
SampledNormalDistribution()
           
SampledNormalDistribution(VectorWritable modelPrototype)
           
 
Method Summary
 Model<VectorWritable>[] sampleFromPosterior(Model<VectorWritable>[] posterior)
          Return a list of models sampled from the posterior
 Model<VectorWritable>[] sampleFromPrior(int howMany)
          Return a list of models sampled from the prior
 
Methods inherited from class org.apache.mahout.clustering.dirichlet.models.VectorModelDistribution
getModelPrototype, setModelPrototype
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SampledNormalDistribution

public SampledNormalDistribution()

SampledNormalDistribution

public SampledNormalDistribution(VectorWritable modelPrototype)
Method Detail

sampleFromPrior

public Model<VectorWritable>[] sampleFromPrior(int howMany)
Description copied from interface: ModelDistribution
Return a list of models sampled from the prior

Specified by:
sampleFromPrior in interface ModelDistribution<VectorWritable>
Overrides:
sampleFromPrior in class NormalModelDistribution
Parameters:
howMany - the int number of models to return
Returns:
a Model[] representing what is known apriori

sampleFromPosterior

public Model<VectorWritable>[] sampleFromPosterior(Model<VectorWritable>[] posterior)
Description copied from interface: ModelDistribution
Return a list of models sampled from the posterior

Specified by:
sampleFromPosterior in interface ModelDistribution<VectorWritable>
Overrides:
sampleFromPosterior in class NormalModelDistribution
Parameters:
posterior - the Model[] after observations
Returns:
a Model[] representing what is known apriori


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