Decision tree - How does scikit learn construct it


(KNH) #1

Hello there,

I need some clarity on how a decision tree is constructed by scikit learn.
In lesson 2, the professor states the following about how a tree is constructed:

We also have a way to find the best split which is to try try every variable and to try every possible value of that variable and see which variable and which value gives us a split with the best score

Now lets think for a moment that we have 10 independent variables but as part of our Random Forest regressor, we only request 3 trees. So in this case, how does scikit learn perform the binary split on the trees?

Does it only split on the best 3 independent variables which give us the best RMSE?

Kindly clarify.

Regards,
Kiran Hegde