|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.mahout.clustering.iterator.ClusterIterator
public final class ClusterIterator
This is a clustering iterator which works with a set of Vector data and a prior ClusterClassifier which has been initialized with a set of models. Its implementation is algorithm-neutral and works for any iterative clustering algorithm (currently k-means, fuzzy-k-means and Dirichlet) that processes all the input vectors in each iteration. The cluster classifier is configured with a ClusteringPolicy to select the desired clustering algorithm.
| Field Summary | |
|---|---|
static String |
PRIOR_PATH_KEY
|
| Method Summary | |
|---|---|
static ClusterClassifier |
iterate(Iterable<Vector> data,
ClusterClassifier classifier,
int numIterations)
Iterate over data using a prior-trained ClusterClassifier, for a number of iterations |
static void |
iterateMR(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path inPath,
org.apache.hadoop.fs.Path priorPath,
org.apache.hadoop.fs.Path outPath,
int numIterations)
Iterate over data using a prior-trained ClusterClassifier, for a number of iterations using a mapreduce implementation |
static void |
iterateSeq(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path inPath,
org.apache.hadoop.fs.Path priorPath,
org.apache.hadoop.fs.Path outPath,
int numIterations)
Iterate over data using a prior-trained ClusterClassifier, for a number of iterations using a sequential implementation |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String PRIOR_PATH_KEY
| Method Detail |
|---|
public static ClusterClassifier iterate(Iterable<Vector> data,
ClusterClassifier classifier,
int numIterations)
data - a List<Vector> of input vectorsclassifier - a prior ClusterClassifiernumIterations - the int number of iterations to perform
public static void iterateSeq(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path inPath,
org.apache.hadoop.fs.Path priorPath,
org.apache.hadoop.fs.Path outPath,
int numIterations)
throws IOException
conf - the ConfigurationinPath - a Path to input VectorWritablespriorPath - a Path to the prior classifieroutPath - a Path of output directorynumIterations - the int number of iterations to perform
IOException
public static void iterateMR(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path inPath,
org.apache.hadoop.fs.Path priorPath,
org.apache.hadoop.fs.Path outPath,
int numIterations)
throws IOException,
InterruptedException,
ClassNotFoundException
conf - the ConfigurationinPath - a Path to input VectorWritablespriorPath - a Path to the prior classifieroutPath - a Path of output directorynumIterations - the int number of iterations to perform
IOException
InterruptedException
ClassNotFoundException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||