Implementing Naive Bayes From Scratch