org.apache.mahout.clustering.kmeans
Class RandomSeedGenerator

java.lang.Object
  extended by 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
           
 
Method Summary
static org.apache.hadoop.fs.Path buildRandom(java.lang.String input, java.lang.String output, int k)
           
static java.util.List<Vector> chooseRandomPoints(java.util.List<Vector> vectors, int k)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

K

public static final java.lang.String K
See Also:
Constant Field Values
Method Detail

buildRandom

public static org.apache.hadoop.fs.Path buildRandom(java.lang.String input,
                                                    java.lang.String output,
                                                    int k)
                                             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.util.List<Vector> vectors,
                                                        int k)


Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.