C1_W2 Exercirse 3

Hi, I was following I was trying to check the exercise but I got a different answer from the one I was supposed to and now I don´t If what I did is correct or not.

Interesting. You get the wrong answers on the predictions of specific tweets, but you pass the unit tests for that function. I took a look at the unit test logic and they supply their own input values for logprior and loglikelihood. But in the visible cases that fail and generate 0.0, you are using global variables in the notebook that were created by earlier cells. Are you sure that you ran all the cells in the correct order and that your code for train_naive_bayes passed its test cases?

In other words, my theory is that your naive_bayes_predict code is correct, but the logprior and loglikelihood values that currently exist in your notebook are not correct. Now the question is how that could happen.

Actually if you are still having the problem you describe on this other thread, that would explain things. In other words the problem is that your train_naive_bayes function is that one that is broken and it needs to work in order to produce the logprior and loglikelihood values that the next function uses.