# C3_W1 Exercise 5 Expected Output Doesnt match

For some reason I dont get the same parameters as the expected output. I don’t see where I could have gone wrong with the code since the code just calls the estimate functions from utils. Can i get some help here?

Hi @Raymond_Garcia, can you send me your notebook via DM and I’ll take a look?

I have the same problem. Can I share my notebook too ?

Thank you.

Kevin

I got the following output:

Example dog has breed 1 and features: height = 26.57, weight = 21.56, bark_days = 13.00, ear_head_ratio = 0.27

Probability of these features if dog is classified as breed 0: 3.686370770645471e-14
Probability of these features if dog is classified as breed 1: 0.0010629002730701976
Probability of these features if dog is classified as breed 2: 6.362270811463823e-09

Even though, all the previous sections’ output matched the expected output.

Also, my prediction = 0.39 vs 1.0
Not sure why.

I would appreciate some help.

I found my issue. It was in the inner dict. When the code was running I was getting the same parameters for each breed and that caused issues down the line. I was also getting .39 accuracy down the line. I found that the problem was that I wasnt using the sliced df, df_breed, in my inner dict. @kevin i hope that helps you out.

I had another issue, however, with the last part of the assignment. Definitely not understanding something about the material since I wasn’t able to put together the naive bayes function at the end. I passed the assignment, but I would still like to get a better understanding of that last exercise. Can I still send the ipynb over to you?

Raymond,

Thank you for the help. Would you mind sharing a bit more detail about the slice problem?

I am not fully understanding what you mean by not using the slice?

Did the fix change your prediction ?

Thank!
Kevin

hard to share without giving you the answer. but i was basically using the full dataframe instead of the filtered dataframe in the inner dict

@Kevin_Shey, sure, send it via a DM and I’ll take a look

Will give it a try. Thanks!