Daily Dose of Data Science

Share this post

Simple One-Liners to Preview a Decision Tree Using Sklearn

www.blog.dailydoseofds.com

Discover more from Daily Dose of Data Science

High-quality insights on Data Science and Python, along with best practices — shared daily. Get a free 550+ page data science PDF guide and 450+ practice questions notebook.
Over 49,000 subscribers
Continue reading
Sign in

Simple One-Liners to Preview a Decision Tree Using Sklearn

Avi Chawla
Feb 9, 2023
4
Share this post

Simple One-Liners to Preview a Decision Tree Using Sklearn

www.blog.dailydoseofds.com
Share

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.

Thanks for reading Daily Dose of Data Science! Subscribe for free to learn something new about Python and Data Science every day.


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.

4
Share this post

Simple One-Liners to Preview a Decision Tree Using Sklearn

www.blog.dailydoseofds.com
Share
Previous
Next
Comments
Top
New
Community

No posts

Ready for more?

© 2023 Avi Chawla
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing