Decision Trees

This category groups articles that are oriented on the topic of Decision Trees. Each post focuses on specific aspects, or attributes, of Decision Trees. The emphasis here is on gaining a deep intuition for how Decision Trees work. Worked examples in Python are provided.

decision trees handle missing values

Can Decision Trees Handle Missing Values?

Can Decision Trees Handle Missing Values? Yes, Decision Trees handle missing values naturally. It is straightforward to extend the CART algorithm to support the handling of missing values. However, attention needs to be made regarding how the algorithm is implemented in code. In this post, I will implement classification and regression Decision Trees capable of dealing …

Can Decision Trees Handle Missing Values? Read More »

Tune Hyperparameters in Decision Trees

3 Methods to Tune Hyperparameters in Decision Trees

3 Methods to Tune Hyperparameters in Decision Trees We can tune hyperparameters in Decision Trees by comparing models trained with different parameter configurations, on the same data. An optimal model can then be selected from the various different attempts, using any relevant metrics. There are several different techniques for accomplishing this task. Three of the …

3 Methods to Tune Hyperparameters in Decision Trees Read More »

Information gain in decision trees

How to Measure Information Gain in Decision Trees

How to Measure Information Gain in Decision Trees For classification problems, information gain in Decision Trees is measured using the Shannon Entropy. The amount of entropy can be calculated for any given node in the tree, along with its two child nodes. The difference between the amount of entropy in the parent node, and the …

How to Measure Information Gain in Decision Trees Read More »

Build a Decision Tree in Python

Build a Decision Tree in Python from Scratch

Build a Decision Tree in Python from Scratch In this post, we will build a CART Decision Tree model in Python from scratch. We will start with the foundational principals, and work straight through to implementation in code. Both classification and regression examples will be included. Motivation to Build a Decision Tree Model Decision Trees are …

Build a Decision Tree in Python from Scratch Read More »