org.apache.mahout.clustering.kmeans
Class RandomSeedGenerator
java.lang.Object
org.apache.mahout.clustering.kmeans.RandomSeedGenerator
public final class RandomSeedGenerator
- extends java.lang.Object
Given an Input Path containing a SequenceFile
, randomly select k vectors and
write them to the output file as a Cluster
representing the
initial centroid to use.
Field Summary |
static java.lang.String |
K
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
K
public static final java.lang.String K
- See Also:
- Constant Field Values
buildRandom
public static org.apache.hadoop.fs.Path buildRandom(org.apache.hadoop.fs.Path input,
org.apache.hadoop.fs.Path output,
int k,
DistanceMeasure measure)
throws java.io.IOException,
java.lang.IllegalAccessException,
java.lang.InstantiationException
- Throws:
java.io.IOException
java.lang.IllegalAccessException
java.lang.InstantiationException
chooseRandomPoints
public static java.util.List<Vector> chooseRandomPoints(java.lang.Iterable<Vector> vectors,
int k)
Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.