Let’s build a tree with a pen and paper

juin 7, 2022 · Filed Under 12 month installment loans · Commentaire 

Let’s build a tree with a pen and paper

In practice, most of the time Gini impurity is used as it gives good results for splitting and its computation is inexpensive. We have a dummy dataset below, the features(X) are Chest pain, Good blood circulation, Blocked arteries and to be predicted column is Heart disease(y). Every column has two possible options yes and no.

We aim to build a decision tree where given a new record of chest pain, good blood circulation, and blocked arteries we should be able to tell if that person has heart disease or not. At the company web site start, all our samples are in the root node. We will have to decide on which of the feature the root node should be divided first.

We will focus first on how heart disease is changing with Chest pain (ignoring good blood circulation and blood arteries). Lire la suite