Class DecisionTreeEx1

java.lang.Object
com.imsl.test.example.datamining.decisionTree.DecisionTreeEx1

public class DecisionTreeEx1 extends Object

Fits a decision tree to the golf data using C45 and ALACART.

In this example, we use a small data set with response variable, Play, which indicates whether a golfer plays (1) or does not play (0) golf under weather conditions measured by Temperature, Humidity, Outlook (Sunny (0), Overcast (1), Rainy (2)), and Wind (True (0), False (1)). A decision tree is generated by C45 and the ALACART class. The control parameters are adjusted because of the small data size and no cross-validation or pruning is performed. The maximal trees are printed out using the method, DecisionTree.printDecisionTree Notice that C45 splits on Outlook, then Humidity and Wind, while ALACART splits on Outlook, then Temperature.

See Also:
  • Constructor Details

    • DecisionTreeEx1

      public DecisionTreeEx1()
  • Method Details