implement generate tree from train data
implement generate tree from train data