wussup/NaiveBayes

Bug: Missing laplacian correction

orealeb opened this issue · 0 comments

Bug Report
Bug Report 2: #2

Date Seen
2/25/2015

Versions
Windows 7 Enterprise
64-Bit Operating System
Eclipse IDE for Java Developers Luna 64-bit

Bug Description
Missing laplacian correction.

Severity
Minor

Steps to Reproduce

  1. Open Eclipse
  2. Import source code as new project on Eclipse Run source code Step by step instructions on how to reproduce this bug.
  3. Modify data1 file to contain iris data set from the UCI repository https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data (i.e copy iris data set into data1)
  4. Run project to obtain output

Actual Behavior
The implementation did not include laplacian correction for smoothing in its calculation which led to a high number of missed test cases. No using laplacian correction, resulted to the majority of missed test cases because the probability for each class being assigned to the test case was 0. When this occurred, the implementation chose the last class in the list of classes, of which is always ’Iris-virginica’.

Expected Behavior
Implementation should not choose the last class in the list of classes, of which is always ’Iris-virginica’. Instead appropriate class labels should be assigned.

Troubleshooting/Testing Steps Attempted
Adding laplacian correction to the implementation fixed bug.