Hello,

I have written a function for compute_information_gain(). I get all the expected values but I still get the following error:

Any thoughts/advice?

All the best,

Sunny

Hello,

I have written a function for compute_information_gain(). I get all the expected values but I still get the following error:

Any thoughts/advice?

All the best,

Sunny

â€śnanâ€ť means â€śnot a numberâ€ť. The value being returned by your compute_information_gain() function is not a numeric value, so the assert fails.

Is this perhaps a divide-by-zero error? If it is, I have trouble seeing where this comes from.

Sunny

No, divide by zero gives you a â€śdivide by zeroâ€ť exception.

â€śnanâ€ť can also happens if you are missing a value from a function parameter or an array.

Hi @sunnyw8403,

I was wondering, in exercise 1, it asks to

Check whether you have followed them.

Cheers,

Raymond

Thanks for the help! I checked with my entropy function, and it seems to be alrightâ€¦I followed the format in the hints. Is there anything else that could yield the â€śnanâ€ť error?