Hi David,
I think you should have a look at sklearn.tree.export_graphviz. It
will generate a picture of the tree for you.
- Reference:
http://scikit-learn.org/dev/modules/generated/sklearn.tree.export_graphviz.html#sklearn.tree.export_graphviz
- Example: http://scikit-learn.org/dev/_images/iris.s
Hi,
I will be using a tree. All dependent variables are categorical ordinal.
For each leaf node. I need to get the node id and a list of all attributes
that make up the path to the leaf node. E.g.
root_node
GEO:
NewYork
Boston,Philly
BOSTON:PHILLY->T