# Decision tree: where and how to split an attribute on numerical dataset?

I am new to data mining and am manually implementing decision tree classification on a dataset with all continues values. A very small sample dataset of 4 attributes (columns) would be like this:

0.012  0.64   5.6     1.12   0
0.03   0.48   13.03   0.75   1
0.02   0.19   1.3     2.92   0
0.043  0.37   1.53    0.9    1
0.9    0.44   3.01    0.12   1


Last column contains given class labels. Every value of each column can be a split threshold on that column and to realize where to split, I am using minimum Gini Index following this example:

Assuming that I know which value is best to split on (in a given column), now how can I realize which attribute (column) should be root, left child, right child? I have no idea on how to determine the order to place attributes in the tree. Could you please let me know about this (I would appreciate it if answers come with formulas and examples on how to derive this)

• Decision trees are often not the best choice. Is there are reason you decided to use one here? – Frank Harrell Jun 18 '18 at 11:49