How to Generate a Decision Tree (Cont.)


If the table is a subset of attribute table Si, we need to separate the computation of impurity degree for each value of the attribute i. For example, attribute “Travel cost per km” has three values: Cheap, Standard and Expensive.

Now we sort the table Si=[Travel cost/km, Transportation mode] based on the values of “Travel cost per km.” Then we separate each value of the travel cost and compute the degree of impurity.





      β€œIn order to rise from its own ashes, a Phoenix first must burn.”    
      ― Octavia Butler