public final class BayesUtils extends Object
Modifier and Type | Method and Description |
---|---|
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) |
public static NaiveBayesModel readModelFromDir(org.apache.hadoop.fs.Path base, org.apache.hadoop.conf.Configuration conf)
public static int writeLabelIndex(org.apache.hadoop.conf.Configuration conf, Iterable<String> labels, org.apache.hadoop.fs.Path indexPath) throws IOException
IOException
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
IOException
public static Map<Integer,String> readLabelIndex(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path indexPath)
public static OpenObjectIntHashMap<String> readIndexFromCache(org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
public static Map<String,Vector> readScoresFromCache(org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.