org.apache.mahout.classifier.naivebayes
Class BayesUtils

java.lang.Object
  extended by org.apache.mahout.classifier.naivebayes.BayesUtils

public final class BayesUtils
extends Object


Method Summary
static OpenObjectIntHashMap<String> readIndexFromCache(org.apache.hadoop.conf.Configuration conf)
           
static Map<Integer,String> readLabelIndex(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path indexPath)
           
static NaiveBayesModel readModelFromDir(org.apache.hadoop.fs.Path base, org.apache.hadoop.conf.Configuration conf)
           
static Map<String,Vector> readScoresFromCache(org.apache.hadoop.conf.Configuration conf)
           
static int writeLabelIndex(org.apache.hadoop.conf.Configuration conf, Iterable<String> labels, org.apache.hadoop.fs.Path indexPath)
          Write the list of labels into a map file
static int writeLabelIndex(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path indexPath, Iterable<Pair<org.apache.hadoop.io.Text,org.apache.hadoop.io.IntWritable>> labels)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

readModelFromDir

public static NaiveBayesModel readModelFromDir(org.apache.hadoop.fs.Path base,
                                               org.apache.hadoop.conf.Configuration conf)

writeLabelIndex

public static int writeLabelIndex(org.apache.hadoop.conf.Configuration conf,
                                  Iterable<String> labels,
                                  org.apache.hadoop.fs.Path indexPath)
                           throws IOException
Write the list of labels into a map file

Throws:
IOException

writeLabelIndex

public static int writeLabelIndex(org.apache.hadoop.conf.Configuration conf,
                                  org.apache.hadoop.fs.Path indexPath,
                                  Iterable<Pair<org.apache.hadoop.io.Text,org.apache.hadoop.io.IntWritable>> labels)
                           throws IOException
Throws:
IOException

readLabelIndex

public static Map<Integer,String> readLabelIndex(org.apache.hadoop.conf.Configuration conf,
                                                 org.apache.hadoop.fs.Path indexPath)

readIndexFromCache

public static OpenObjectIntHashMap<String> readIndexFromCache(org.apache.hadoop.conf.Configuration conf)
                                                       throws IOException
Throws:
IOException

readScoresFromCache

public static Map<String,Vector> readScoresFromCache(org.apache.hadoop.conf.Configuration conf)
                                              throws IOException
Throws:
IOException


Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.