1
$\begingroup$

What happens if we flip the arrows in a Naive Bayes classifier? To clarify - from what I have found naive Bayes is defined for the following network structure:

enter image description here

I'm interested to understand what happens if instead from y->x the child will be y. As shown in the following:

enter image description here

I'm not entirely sure if we get the same results as a regular naive Bayes classifier (intuitively we don't), and if not how to estimate both the likelihood of the network and the parameters?

For further clarification: lets say there is a training set of size n; each data point consisting of (x,y) where x is a vector of size m of binary values and y is the class and is also binary. E.g. (0,1,0,1,1) where the last index is the class. I'm trying to figure out the likelihood of the network (where y is the child) and how to estimate the parameters in the case of y being the child.

$\endgroup$
2
  • $\begingroup$ What do you mean by "flipping arrows"? Can you try being more precise? $\endgroup$
    – Tim
    Commented Dec 11, 2017 at 20:23
  • $\begingroup$ edited, hope it is clearer now $\endgroup$
    – DML
    Commented Dec 11, 2017 at 21:02

1 Answer 1

3
$\begingroup$

Your flipped graph is logistic regression. A good description of the relationship between logistic regression and the naive Bayes classifier can be found in Jordan 1995.

You will not get the same results in both models. In general logistic regression will be superior because it only needs to characterize a decision boundary rather than full conditional distributions, which is easier. Indeed it makes no assumptions about the distribution of the Xs at all.

The parameters of both models can be estimated using the usual principles, e.g. Bayes or ML (most likely with a regularizer). However, only for the naive Bayes model do these have a closed form.

Late addition (2022) since I just noticed:

There are undirected connections drawn between the $X$'s in the first graph and, strictly speaking, Naive Bayes assumes that there are only $Y \rightarrow X$ connections. So if the generative model is as you draw it then Naive Bayes will get things wrong by assuming those connections are absent.

In contrast, logistic regression - the second version - need not assume any distribution for $X$s at all (and if it does, it won't matter), so correlations induced by those connections are not problematic for estimation or for predicting $Y$. In that sense it's usually more practically appealing.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.