Rounding error on Week 1 Assignment Exercise 6

I’m getting a very small rounding error for only the probability of breed 1. My answer diverges from the expected output after the 15th digit. Is this my error? Or is the expected output wrong? And if I can’t figure out why, will this result in a point deduction?

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

Probability of these features if dog is classified as breed 0: 6.989632718589114e-11
Probability of these features if dog is classified as breed 1: 0.003826777832702493
Probability of these features if dog is classified as breed 2: 7.959172138800559e-08
Expected Output

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

Probability of these features if dog is classified as breed 0: 6.989632718589114e-11
Probability of these features if dog is classified as breed 1: 0.0038267778327024894
Probability of these features if dog is classified as breed 2: 7.959172138800559e-08


The 15th digit isn’t significant. That isn’t rounding, it’s the machine precision.
Don’t worry about it.

1 Like

Thank you! Appreciate the confirmation