Binary Search Tree with categorical and numeric values in python
If PlayTennis is your target classification label, you could map the numeric values to intervalls. Finding appropriate intervalls can be done by first sorting the numeric values and then using Intervalls at which there is a change in your target label. In this case we have a change between 48 and 60, and between 80 and 90. (48+60)/2 = 54 and (80+90)/2 = 85 are good candidates for label-intervalls. (T>54) and (T>85) would be the labels.