Classification Tree Training Example

Learn how Gini impurity and Gini change are used to train a decision tree from a dataset.

The dataset

We’ll use the following hypothetical dataset for this lesson. The dataset has been designed similarly to the Adult Census Income dataset, but the data is much simpler. The goal is to train a classification decision tree that accurately predicts income levels.

The dataset consists of three binary categorical features (college, union, and manager) and a binary label (income):

Get hands-on with 1200+ tech skills courses.