org.apache.mahout.classifier.bayes
Class TrainClassifier

java.lang.Object
  extended by org.apache.mahout.classifier.bayes.TrainClassifier

public final class TrainClassifier
extends Object

Train the Naive Bayes classifier with improved weighting. A properly formatted file for input is one which has one document per line with the first entry as the label and the rest as evidence.

See Also:
BayesFileFormatter

Method Summary
static void main(String[] args)
           
static void trainCNaiveBayes(org.apache.hadoop.fs.Path dir, org.apache.hadoop.fs.Path outputDir, BayesParameters params)
           
static void trainNaiveBayes(org.apache.hadoop.fs.Path dir, org.apache.hadoop.fs.Path outputDir, BayesParameters params)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

trainNaiveBayes

public static void trainNaiveBayes(org.apache.hadoop.fs.Path dir,
                                   org.apache.hadoop.fs.Path outputDir,
                                   BayesParameters params)
                            throws IOException
Throws:
IOException

trainCNaiveBayes

public static void trainCNaiveBayes(org.apache.hadoop.fs.Path dir,
                                    org.apache.hadoop.fs.Path outputDir,
                                    BayesParameters params)
                             throws IOException
Throws:
IOException

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception


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