Course Wiki

Decision Trees

The if-else style model behind random forests: learning split rules from data.

Module 6 opens ensemble learning with decision trees: models that partition the feature space with learned split rules, choosing splits that best separate the target. A single tree overfits easily — it can memorize the training set — so the module treats it mainly as a building block.

The practical work trains trees with scikit-learn, reads feature importance from the fitted model, and then combines many trees two ways: bagging into random forests, and boosting with XGBoost. Hyperparameter tuning (max depth, min samples per leaf) against a validation set decides how deep the trees grow.

Taught in


DataTalks.Club. Hosted on GitHub Pages. Built with Rustkyll. We use cookies.