Hi,
I implemented the method compute_information_gain() and it seems to work partially. I am getting an error while running the test cases:
AssertionError Traceback (most recent call last)
in
9
10 # UNIT TESTS
—> 11 compute_information_gain_test(compute_information_gain)
~/work/public_tests.py in compute_information_gain_test(target)
101 node_indexes = list(range(4))
102 result = target(X, y, node_indexes, 0)
→ 103 assert np.isclose(result, 0.311278, atol=1e-6), f"Wrong information gain. Expected {0.311278} got: {result}"
104
105 result = target(X, y, node_indexes, 1)
AssertionError: Wrong information gain. Expected 0.311278 got: 0.4199730940219749
Can someone please help?
Thanks!