Add naive bayes code