Calculate the decison tree