I encountered an error related to ‘information_gain’ in the third exercise of week 4. Can someone please help me fix it.
I suspect the problem is actually in your compute_entropy() function. Trace through your code and see whether your code works correctly if len(y) is zero.