smarie/python-m5p

Visualize decision tree using graphviz / other library

TheDumbfounds opened this issue · 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

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.