How can I fixed error in get_best_test in C2_W4_Decision_Tree_with_markdown


How can I fixed this problem, I’ve try code by my own way and try another one following structure in hint, but it can’t fixed it.

Hi @Kwankhao_Tangprasert,

Has the function compute_information_gain() passed all test cases? The problem suggests that you may be selecting the wrong feature to find the best split. The issue could be with the implementation of the compute_information_gain() function or with the condition used to check for the max_info_gain in the get_best_split() function. Please compare your implementation against the provided hints. If the problem persists, please send me a screenshot of the code via DM.

Best,
Mujassim

Yeah, Now I can fixed it. Thank you for advise. :pray: