Add skeleton for training/testing naive bayes classifier

Authored by kqr on Jun 11 2018, 2:49 PM.


Test Plan

mvn clean compile exec:java

Diff Detail

rMLVP voting-pred
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
kqr created this revision.Jun 11 2018, 2:49 PM
kqr added a comment.Jun 11 2018, 2:55 PM
  • Handle exceptions
  • Add static fields for magic constants
  • Encapsulate training
  • Add text-based UI
kqr added a reviewer: kqr.Jun 11 2018, 2:55 PM
kqr updated this revision to Diff 10.Jun 11 2018, 3:25 PM

Fixed magic constants, factored out loading, abstracted splitting

kqr updated this revision to Diff 11.Jun 12 2018, 4:51 AM

Fixed issues mentioned in review

kqr added a comment.Jun 12 2018, 4:54 AM
  • Order imports
  • Splitdata should be static method
  • Exception handlers should use system.err
  • Using system.err rather than system.out for evaluation summary is a bit iffy but will pass for now
kqr updated this revision to Diff 12.EditedJun 12 2018, 4:59 AM

Addressing new comments

kqr accepted this revision.Jun 12 2018, 5:00 AM

Okay, good!

This revision is now accepted and ready to land.Jun 12 2018, 5:00 AM
This revision was automatically updated to reflect the committed changes.