public class NaiveBayesModel extends Object
Modifier and Type | Field and Description |
---|---|
static String |
COMPLEMENTARY_MODEL |
Constructor and Description |
---|
NaiveBayesModel(Matrix weightMatrix,
Vector weightsPerFeature,
Vector weightsPerLabel,
Vector thetaNormalizer,
float alphaI,
boolean isComplementary) |
Modifier and Type | Method and Description |
---|---|
float |
alphaI() |
Vector |
createScoringVector() |
double |
featureWeight(int feature) |
boolean |
isComplemtary() |
double |
labelWeight(int label) |
static NaiveBayesModel |
materialize(org.apache.hadoop.fs.Path output,
org.apache.hadoop.conf.Configuration conf) |
double |
numFeatures() |
int |
numLabels() |
void |
serialize(org.apache.hadoop.fs.Path output,
org.apache.hadoop.conf.Configuration conf) |
double |
thetaNormalizer(int label) |
double |
totalWeightSum() |
void |
validate() |
double |
weight(int label,
int feature) |
public static final String COMPLEMENTARY_MODEL
public double labelWeight(int label)
public double thetaNormalizer(int label)
public double featureWeight(int feature)
public double weight(int label, int feature)
public float alphaI()
public double numFeatures()
public double totalWeightSum()
public int numLabels()
public Vector createScoringVector()
public boolean isComplemtary()
public static NaiveBayesModel materialize(org.apache.hadoop.fs.Path output, org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
public void serialize(org.apache.hadoop.fs.Path output, org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
public void validate()
Copyright © 2008–2015 The Apache Software Foundation. All rights reserved.