PLEASE SHARE ONLY SCREENSHOT OF YOUR SUBMISSION OUTPUT.
In your submission output, click on the show grader output to know why you failed your submission.
Regards
DP
what does your prob_owrd_given_class grader output shows?
Click on the > next to each section were you received 0 points. This will show you the detailed grader feedback. That’s what we need to see.
Did you download your notebook to work on it using some other platform (such as VSCode or Colab, or any other environment), then upload it back to Coursera for grading?
I used notebbok on coursera
Just to confirm can you confirm if you refresh the notebook before starting to do the notebook assignment as this course was very recently updated. So please confirm if you have updated the lab before doing the assignment.
The reason I doubt this because my grader cell for prob_word_Given_class looks totally different from what you have shared.
Regards
DP
yes I updated the notebook I don’t understand why you see it not compiled when I compiled it
for naive bayes, your codes for p_ham and p_spam is incorrect. You do not need to assign classification of ham (0) and spam (1) in the recalled codes but only call them with spam and ham in p_ham and p_spam.
For the other grader cell, can you send the screenshot of it via personal DM, to check what might have gone. wrong. Click on my name and then message.
Regards
DP
your prob_word_given grader cell is getting failed because of incorrect recall for num_emails from the grader cell get_word_frequency. It didn’t throw any error because you used a numerical value, so it only calculated what codes you wrote as per expected result.
You need to recall number of emails as per length of array of emails, where each email is represented as a list of words.
Regards
DP
The change or correction you did was correct, but also changed a code which was already given by the autograder
Iterates over every processed email and its label
for i in range(num_emails): (** YOU HAVE CHANGES NUM_MAILS TO A INCORRECT CODE**)
WRITE CODES ONLY WHERE NONE WAS MENTIONED. ANY CHANGES DONE TO OTHER PLACES CAN CAUSE, FAILURE OF GRADE.
REGARDS
DP