Codes for training and testing Naive Bayes in MapReduce