Public Member Functions | |
NaiveBayes () | |
void | learn (DataSet trainSet) |
boolean | classify (DataSet testSet) |
Protected Member Functions | |
void | printStructure () |
ClassifyResult | classify (String[] attributeValue) |
Naive Bayes classifier. After create an instance, need to train first and then classify
|
inline |
Constructor. Don't do too much, just create lists. Need to call learn() on trainSet to build classifer
|
inline |
Classify a data set, print out the results and accuracy
testSet | data set to classify |
|
inlineprotected |
Given an array of attributes, classify it with trained bayes net, return the classification
attributeValue | An array of attribute values |
|
inline |
Learn probability table from training instances
trainSet | training data set |
|
inlineprotected |
Print structure