Considering that individual trees in random forests use the cart algorithm(or can be configured to) , if cart fails to predict anything(empty tree) ,why should random forest perform better on the same dataset.

Edit: I am using R (rpart vs randomForest) ; the data is daily financial data of a stock. CART gave empty trees but random forest achieved decent accuracy even on unseen data.

  • 2
    $\begingroup$ Consider posting this on the Data Science exchange. Maybe include some more details about the problem because getting empty trees is a sign that there is a problem. Are you in Python, R, something else? $\endgroup$
    – C8H10N4O2
    Jun 18 '20 at 20:43

The goal of having a "forest" (baggging ensemble) of trees is to make the prediction more solid. Individual decision tree tend to overfit, and with Random Forest the sampling, features selection and bagging helps to make a more robust score.

Its weird that you have an empty tree, since decision tree are greedy and they will fit to anything. Even if there is just random noise in your data they will make splits (depends a bit on how you have configurated it).

If you have an empty tree, random forest wont do nothing since is just a bunch of decision trees.

With out seeing your code, or nothing else I would guess that you have a coding error somewhere.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.