This project implements the Naive Bayes Classifier in C++. It utilizes the Thread Pool for multi-processing during training and testing.
It also makes use of glog, boost library and Json for Modern C++.
$ configure
$ make
$ make install
$ src/naive_bayes -h
$ src/naive_bayes -J -t train.json -T test.json -l label -f field_map.txt -P8
-J: The input file is in Json format. If is in CSV format, use -C.
-t: The train file in json format.
-T: The test file in json format.
-l: The field name in the json file serves as the label of the entry.
-f: The field map indicates which fields in the json file will
be used to train and test. One field name per each line.
-P: Parallel processing for the training and testing.
Comments, questions and pull requests are equally welcome.
Thanks,
-WeeSan <weesan@weesan.com>