Added the classification code to the Decision Tree implementation. Classification is a visit of the tree. If the new observation matches the value contained in the internal node, then the true branch if followed. Otherwise, the false branch is followed. Nothing can simpler than this.
Please note that a complete Decision Tree implementation should also incorporate some pruning strategy, but I will leave this to the interested reader ;-)
No comments:
Post a Comment