Generalized Naive Bayes