traverse a binary decison tree using python?
- by kaushik
how to traverse a binary decision tree using python language.
given a tree,i want know how can we travesre from root to required leaf
the feature of the required leaf are given in an dictionary form assume and have to traverse from root to leaf answering the questions at each node with the details given in feature list..
the decision tree node has format ((question)(left tree)(right tree))
while traversing it should answer question at each node and an choose left or right and traverse till leaf?