Implementing a Decision Tree and Random Forest from scratch in python.
In the DT_orig.py
file, it contains the code from the article Implementing a Decision Tree From Scratch which is a simple implementation of a Decision Tree. However, in that article the author only implements the Decision Tree based on the criterion entropy
and excluding gini
implmentation. As well as the Tree only accepts numpy arrays and numerical values only.
In this project I implemented the following:
- The
gini
criterion - Uses
pandas.DataFrame
instead of numpy array - The target value can be
categorical
input. - Random Forest Ensemble