org.apache.mahout.clustering.dirichlet
Class DirichletState<O>

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

public class DirichletState<O>
extends java.lang.Object


Constructor Summary
DirichletState()
           
DirichletState(ModelDistribution<O> modelFactory, int numClusters, double alpha_0)
           
 
Method Summary
 double adjustedProbability(O x, int k)
          return the adjusted probability that x is described by the kth model
 java.util.List<DirichletCluster<O>> getClusters()
           
 Vector getMixture()
           
 ModelDistribution<O> getModelFactory()
           
 Model<O>[] getModels()
           
 int getNumClusters()
           
 void setClusters(java.util.List<DirichletCluster<O>> clusters)
           
 void setMixture(Vector mixture)
           
 void setModelFactory(ModelDistribution<O> modelFactory)
           
 void setNumClusters(int numClusters)
           
 Vector totalCounts()
           
 void update(Model<O>[] 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<O> modelFactory,
                      int numClusters,
                      double alpha_0)

DirichletState

public DirichletState()
Method Detail

getNumClusters

public int getNumClusters()

setNumClusters

public void setNumClusters(int numClusters)

getModelFactory

public ModelDistribution<O> getModelFactory()

setModelFactory

public void setModelFactory(ModelDistribution<O> modelFactory)

getClusters

public java.util.List<DirichletCluster<O>> getClusters()

setClusters

public void setClusters(java.util.List<DirichletCluster<O>> clusters)

getMixture

public Vector getMixture()

setMixture

public void setMixture(Vector mixture)

totalCounts

public Vector totalCounts()

update

public void update(Model<O>[] newModels)
Update the receiver with the new models

Parameters:
newModels - a Model[] of new models

adjustedProbability

public double adjustedProbability(O 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<O>[] getModels()


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