-
Notifications
You must be signed in to change notification settings - Fork 6
Decision Tree in R : Heart Failure Prediction
Rahul Mondal edited this page Jan 30, 2022
·
9 revisions
We have implemented the following algorithms of Decision Trees for comparison of accuracy
- CART
- C 4.5
- C 5.0
We have taken (2/3)rd of our Heart Failure Prediction Dataset to be used as Training Dataset & (1/3)rd to be used as Testing Dataset
- depth = 4
- leaf nodes = 4

Accuracy = (55+23)/(55+23+8+11) = 80.41 %
- depth = 7
- leaf nodes = 7

Accuracy = (56+20)/(56+20+7+14) = 78.35 %
- depth = 6
- leaf nodes = 6

Accuracy = (55+23)/(55+23+8+11) = 80.41 %
There is a slight decrease in accuracy in C 4.5 from CART (also C 5.0) & this might be due to the higher number of leaf nodes present in the C 5.0 model than in CART. Without any pruning being performed on either of the models, the higher number of leaf nodes causes the Training Dataset to overfit & the Testing Dataset to underfit for C 4.5