Member-only story

Decision Tree Classifier in Python

Step-by-step follow-along | Data Series | Episode 11.2

Mazen Ahmed
4 min readJan 30, 2022

An explanation of Decision Tree Classifier: Episode 11.1

How to set up your programming environment can be found at the start of :
Episode 4.3

You can view and use the code and data in this episode here: Link

Note: Heart disease and heart failure are not the same. Heart attacks and heart failure are both forms of heart disease. The dataset should be renamed to heart_disease_dataset.

Objective

Produce a decision tree classifier to classify if a person has heart disease or not based on Age, maximum heart rate, cholesterol, and other factors.

Dataset Description

The dataset contains 12 columns.
In this episode we focus on the following columns:

  1. Age
  2. Sex (M = Male, F = Female)
  3. Resting BP (Resting Blood Pressure)
  4. Cholesterol (Serum Cholesterol)

--

--

Mazen Ahmed
Mazen Ahmed

No responses yet