## org.apache.mahout.clustering.dirichlet
Class DirichletState

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

    public class DirichletState

extends java.lang.Object

Constructor Summary
`DirichletState()`
`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
`java.util.List<DirichletCluster>` `getClusters()`
`Vector` `getMixture()`
`ModelDistribution<VectorWritable>` `getModelFactory()`
`Model<VectorWritable>[]` `getModels()`
`int` `getNumClusters()`
`void` `setClusters(java.util.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()

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 java.util.List<DirichletCluster> getClusters()

### setClusters

    public void setClusters(java.util.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<Observation>[] 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-2010 The Apache Software Foundation. All Rights Reserved.