You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mahout.apache.org by co...@apache.org on 2009/09/18 10:18:02 UTC
[CONF] Apache Lucene Mahout > fuzzy-k-means-commandline
Space: Apache Lucene Mahout (http://cwiki.apache.org/confluence/display/MAHOUT)
Page: fuzzy-k-means-commandline (http://cwiki.apache.org/confluence/display/MAHOUT/fuzzy-k-means-commandline)
Added by Isabel Drost:
---------------------------------------------------------------------
h1. Introduction
This quick start page describes how to run the [Fuzzy kMeans| http://en.wikipedia.org/wiki/Data_clustering#Fuzzy_c-means_clustering] clustering algorithm on a Hadoop cluster. More information on the implementation itself is available in JIRA issue [MAHOUT-74|https://issues.apache.org/jira/browse/MAHOUT-74]
h1. Steps
h2. Testing it on one single machine w/o cluster
In the examples directory type:
{code}mvn -q exec:java -Dexec.mainClass="org.apache.mahout.clustering.fuzzykmeans.FuzzyKMeansJob" -Dexec.args="<OPTIONS>"{code}
h2. Running it on the cluster
* In $MAHOUT_HOME/, build the jar containing the job (mvn install) The job will be generated in $MAHOUT_HOME/core/target/ and it's name will contain the Mahout version number. For example, when using Mahout 0.1 release, the job will be mahout-core-0.1.jar
* (Optional) 1 Start up Hadoop: $HADOOP_HOME/bin/start-all.sh
* Put the data: $HADOOP_HOME/bin/hadoop fs -put <PATH TO DATA> testdata
* Run the Job: $HADOOP_HOME/bin/hadoop jar $MAHOUT_HOME/core/target/mahout-core-<MAHOUT VERSION>.jar org.apache.mahout.clustering.fuzzykmeans.FuzzyKMeansJob -i testdata -c -o output -d org.apache.mahout.utils.CosineDistanceMeasure -v 0.1 -x 10 -p 3 -r 3 -a false -m 0.23 -e org.apache.mahout.matrix.SparseVector
* Get the data out of HDFS and have a look. Use bin/hadoop fs -lsr output to view all outputs.
h1. Command line options
{code}
--input (-i) input The Path for input Vectors. Must be a SequenceFile of Writable, Vector.
--clusters (-c) clusters The directory pathname for initial clusters.
--output (-o) output The directory pathname for output points.
--measure (-d) measure The classname of the DistanceMeasure.
--convergencedelta (-v) convergenceDelta The convergence delta value.
--maxIter (-x) maxIter The maximum number of iterations.
--maxMap (-p) maxMap The maximum number of maptasks.
--maxRed (-r) maxRed The maximum number of reduce tasks.
--doCanopy (-a) doCanopy Does canopy needed for initial clusters.
--fuzzify (-m) fuzzify Param needed to fuzzify the cluster membership values.
--vectorclass (-e) vectorclass Class name of vector implementation to use.
--help (-h) Print out help
{code}
Change your notification preferences: http://cwiki.apache.org/confluence/users/viewnotifications.action