Why are we making a function train here

what is the use of the function train and how is it helping in decision trees.

Hey @sankalparora5, for training decission tree we need a recursive fuction, so the mentor has done it this way, you can guess and practise other way around as well. But this is the best way out. This train function only builds the required decission tree.

hope this resolved your doubt.
Plz mark the doubt as resolved in my doubts section.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.