## org.apache.mahout.classifier.bayes
Class TrainClassifier

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

    public final class TrainClassifier

extends java.lang.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(java.lang.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 java.io.IOException

  Throws:
    `java.io.IOException`

### trainCNaiveBayes

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

  Throws:
    `java.io.IOException`

### main

    public static void main(java.lang.String[] args)
                     throws java.lang.Exception

  Throws:
    `java.lang.Exception`

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