Simple One-Liners to Preview a Decision Tree Using Sklearn
If you want to preview a decision tree, sklearn provides two simple methods to do so.
1. π©π₯π¨π_ππ«ππ creates a graphical representation of a decision tree.
2. ππ±π©π¨π«π_πππ±π builds a text report showing the rules of a decision tree.
This is typically used to understand the rules learned by a decision tree and gaining a better understanding of the behavior of a decision tree model.
Share this post on LinkedIn: Post Link.
Find the code for my tips here:Β GitHub.
I like to explore, experiment and write about data science concepts and tools. You can read my articles on Medium. Also, you can connect with me on LinkedIn.