Naive decision tree implementation in Python