org.apache.mahout.clustering.dirichlet
Class DirichletState<O>
java.lang.Object
org.apache.mahout.clustering.dirichlet.DirichletState<O>
public class DirichletState<O>
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DirichletState
public DirichletState(ModelDistribution<O> modelFactory,
int numClusters,
double alpha_0)
DirichletState
public DirichletState()
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 Observationk
- 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.