Can decision tree algo used for regression?

Hi @tbhaxor

you can use decision trees for regression: sklearn.tree.DecisionTreeRegressor — scikit-learn 1.2.1 documentation

When predicting a continuous variable with a decision tree regressor, you often see this certain typical discretised output. [(Note: regarding your infinity question: you do not want to go for an arbitrary (or infinite depth) also due to the risk of overfitting!].

See here an Adaboost example which is quite nice to start and play around with:


Best regards

1 Like