Decision tree algorithm in python