org.apache.mahout.clustering.dirichlet
Class DirichletState

java.lang.Object
  extended by org.apache.mahout.clustering.dirichlet.DirichletState

public class DirichletState
extends Object


Constructor Summary
DirichletState(DistributionDescription description, int numClusters, double alpha0)
           
DirichletState(ModelDistribution<VectorWritable> modelFactory, int numClusters, double alpha0)
           
 
Method Summary
 double adjustedProbability(VectorWritable x, int k)
          return the adjusted probability that x is described by the kth model
 List<DirichletCluster> getClusters()
           
 Vector getMixture()
           
 ModelDistribution<VectorWritable> getModelFactory()
           
 Model<VectorWritable>[] getModels()
           
 int getNumClusters()
           
 void setClusters(List<DirichletCluster> clusters)
           
 void setMixture(Vector mixture)
           
 void setModelFactory(ModelDistribution<VectorWritable> modelFactory)
           
 void setNumClusters(int numClusters)
           
 Vector totalCounts()
           
 void update(Cluster[] newModels)
          Update the receiver with the new models
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirichletState

public DirichletState(ModelDistribution<VectorWritable> modelFactory,
                      int numClusters,
                      double alpha0)

DirichletState

public DirichletState(DistributionDescription description,
                      int numClusters,
                      double alpha0)
Method Detail

getNumClusters

public int getNumClusters()

setNumClusters

public void setNumClusters(int numClusters)

getModelFactory

public ModelDistribution<VectorWritable> getModelFactory()

setModelFactory

public void setModelFactory(ModelDistribution<VectorWritable> modelFactory)

getClusters

public List<DirichletCluster> getClusters()

setClusters

public void setClusters(List<DirichletCluster> clusters)

getMixture

public Vector getMixture()

setMixture

public void setMixture(Vector mixture)

totalCounts

public Vector totalCounts()

update

public void update(Cluster[] newModels)
Update the receiver with the new models

Parameters:
newModels - a Model[] of new models

adjustedProbability

public double adjustedProbability(VectorWritable x,
                                  int k)
return the adjusted probability that x is described by the kth model

Parameters:
x - an Observation
k - an int index of a model
Returns:
the double probability

getModels

public Model<VectorWritable>[] getModels()


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