org.apache.mahout.clustering.iterator
Class DirichletClusteringPolicy
java.lang.Object
org.apache.mahout.clustering.iterator.AbstractClusteringPolicy
org.apache.mahout.clustering.iterator.DirichletClusteringPolicy
- All Implemented Interfaces:
- org.apache.hadoop.io.Writable, ClusteringPolicy
public class DirichletClusteringPolicy
- extends AbstractClusteringPolicy
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DirichletClusteringPolicy
public DirichletClusteringPolicy()
DirichletClusteringPolicy
public DirichletClusteringPolicy(int k,
double alpha0)
- Parameters:
k
- The number of models to create from prioralpha0
- The alpha_0 parameter to the Dirichlet Distribution.
select
public Vector select(Vector probabilities)
- Description copied from interface:
ClusteringPolicy
- Return a vector of weights for each of the models given those probabilities
- Specified by:
select
in interface ClusteringPolicy
- Overrides:
select
in class AbstractClusteringPolicy
- Parameters:
probabilities
- a Vector of pdfs
- Returns:
- a Vector of weights
update
public void update(ClusterClassifier prior)
- Description copied from interface:
ClusteringPolicy
- Update the policy with the given classifier
- Specified by:
update
in interface ClusteringPolicy
- Overrides:
update
in class AbstractClusteringPolicy
- Parameters:
prior
- a ClusterClassifier
write
public void write(DataOutput out)
throws IOException
- Specified by:
write
in interface org.apache.hadoop.io.Writable
- Specified by:
write
in class AbstractClusteringPolicy
- Throws:
IOException
readFields
public void readFields(DataInput in)
throws IOException
- Specified by:
readFields
in interface org.apache.hadoop.io.Writable
- Specified by:
readFields
in class AbstractClusteringPolicy
- Throws:
IOException
Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.