FAQ: Naive Bayes Classifier - Classify

This community-built FAQ covers the “Classify” exercise from the lesson “Naive Bayes Classifier”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Data Science

FAQs on the exercise Classify

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

I’m confused by the wording in this exercise;

Let’s now consider the denominator P(review) . In our small example, this is the probability that “This”, “crib”, “was”, and “amazing” are the only words in the review.

The only words in the review… what? I read this to mean “we’re calculating the probability that a review is composed of these four words only”, when I thought we were meant to calculate the overall probability of a review’s classification based on the cumulative weights of the words that compose it. What am I missing here? Or is this just written poorly?

Did you get an answer to your doubt?

The reviews.py script throw an error like:
_pickle.UnpicklingError: invalid load key, ‘\xef’
What would be the solution for it so the script.py file could read the .p files?

how do i find the data pos_reviews.p