This is an implementation of the Naive-Bayes Classifier in C++.
Compile and run the classifier.cpp file.
$ g++ -o classifier classifier.cpp
$ ./classifier
I used a custom dataset that has faces represented in txt files. Check out facedatatrain.txt file to understand the data.
datatrain directory contains the training files and dataset contains the testing ones.
NOTE: Code was written specifically for this dataset and will require significant changes before running on some other dataset.
Accuracy: 89.3333%
Confusion Matrix
Predicted Face | Predicted Non-Face | |
---|---|---|
Actual Face | 68 | 5 |
Actual Non-Face | 11 | 66 |
Precision: 86.076%
Recall: 93.1507%
F-measure: 89.4737%