abstract class for Naive Bayes whose classes and features are binary