Member-only story
Feature Importance in Decision Trees
A complete Python implementation and explanation of the calculations behind measuring feature importance in tree-based machine learning algorithms
The aim of this article is to familiarize the reader with how are the importance of features calculated in decision trees. Personally, I have not found an in-depth explanation of this concept and thus this article was born.
All the code used in this article is publicly available and can be found via:
https://github.com/Eligijus112/gradient-boosting
Before diving deeper into the feature importance calculation, I highly recommend refreshing your knowledge about what a tree is and how do we combine them into a random forest using these articles: