Hi Sachin,

Most Mahout jobs have several overloaded run methods. For example:

KMeansDriver.run(configuration, input, clustersIn, output, measure,
convergenceDelta,  maxIterations, runClustering,  runSequential)

Also, most of them extend AbstractJob and implement Hadoop's Tool
interface, so you can use Hadoops ToolRunner and create an array with
the arguments you would specify on the command line.

String[] kmeansArgs = new String[] {
  "--input", inputPath,
  "--output", outputPath,
  "--numClusters", numClusters,
  // More arguments
};

ToolRunner.run(configuration, new KMeansDriver(), kmeansArgs);

See 
https://builds.apache.org/job/Mahout-Quality/javadoc/org/apache/mahout/common/AbstractJob.html

Frank

On Sat, Nov 12, 2011 at 12:55 AM, Ramon Wang <ramon_w...@hotmail.com> wrote:
> Try to read Mahout in Action.
>
> Sent from iPhone
>
>
>
>> Hello everyone,
>>
>> I am new to Mahout and Want to start working on the same. However, on Mahout
>> Website could not find nice java coding examples. I can see some examples
>> which we can run using command line. However, as I felt just running command
>> line will limit the usability of mahout.
>>
>> I want to understand it fully and want coding to be done in Java. If anyone
>> can help me with some examples code that is using Hadoop written examples
>> that would be really helpful.
>>
>>
>> Thanks
>> Sachin
>>
>> --
>> View this message in context: 
>> http://lucene.472066.n3.nabble.com/New-User-to-Mahout-tp3501316p3501316.html
>> Sent from the Mahout User List mailing list archive at Nabble.com.
>

Reply via email to