python-m5p icon indicating copy to clipboard operation
python-m5p copied to clipboard

Visualize decision tree using graphviz / other library

Open TheDumbfounds opened this issue 2 years ago • 1 comments

Hi there,

the title says it all. Is this currently possible? If not, it would be a great feature. The string representation is fine, but especially for displaying it to non-technical users, it would be great to be able to visualize it using graphviz or a similar library :)

Thanks!

Best Gabriele

TheDumbfounds avatar Apr 17 '23 14:04 TheDumbfounds

Thanks @TheDumbfounds for this interesting feature proposal !

Scikit-learn provides such a feature for standard classification and regression trees. Maybe their code can be reused somehow to reach your objective ?

https://scikit-learn.org/stable/modules/generated/sklearn.tree.plot_tree.html

I will be happy to consider any PR here if you want to give it a try.

smarie avatar May 10 '23 12:05 smarie