Package libai.classifiers.bayes
Class NaiveBayes
- java.lang.Object
-
- libai.classifiers.bayes.NaiveBayes
-
public class NaiveBayes extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected MetaData
metadata
protected int
outputIndex
protected java.util.HashMap<Attribute,java.lang.Object[]>
params
protected int
totalCount
-
Constructor Summary
Constructors Constructor Description NaiveBayes()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Attribute
eval(java.util.List<Attribute> x)
static NaiveBayes
getInstance(java.io.File path)
static NaiveBayes
getInstance(DataSet ds)
boolean
save(java.io.File path)
NaiveBayes
train(DataSet ds)
-
-
-
Method Detail
-
getInstance
public static NaiveBayes getInstance(java.io.File path)
-
getInstance
public static NaiveBayes getInstance(DataSet ds)
-
train
public NaiveBayes train(DataSet ds)
-
save
public boolean save(java.io.File path)
-
-