Ben Chuanlong Du's Blog

It is never too late to learn.

Tree-Based Models in scikit-learn

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Comments

  1. If you want a simple decision tree,

DecisionTreeRegressor is prefer to DecisionTreeClassifier as DecisionTreeRegressor is more flexible.

As a matter of fact, ensemble tree-based models (no matter classifiers or regressors) are based on DecisionTreeRegressor instead of DecisionTreeClassifier .

Tips on Scikit-Learn

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

  1. Cross validation in scikit-learn supports pipeline in addition to vanilla models. Please refer to Cross Validation Pipeline for more details.

  2. Label encoding is an easy way to convert a categorical response …