Decision Tree ID3 CART
Decision Tree ID3 CART
Binning
• Binning or discretization is the process of transforming numerical
variables into categorical counterparts.
• An example is to bin values for Age into categories such as 20-39, 40-
59, and 60-79.
• Numerical variables are usually discretized in the modeling methods
based on frequency tables (e.g., decision trees).
• 2, 6, 7, 9, 13, 20, 21, 25, 30
• Width = w = (B-A) / k
• 10,15,16,18,20,30,35,42,48,50,52,55
• Suppose k = 4
• [min, min+w-1]
• [min+w,min+2w-1]
• [min+2w, min+3w-1]
• [min+3w, max]
When to use decision tree?
•Conjunction (and, &, ∧): combine (add) propositions.
•Disjunction (or): choose (select) propositions.
Dataset
Age Competition Type Profit
OLD 0 3
YES 1 3
MID 2 2 No 4 2
NEW 3 0
OLD 0 3
YES 1 3
MID 2 2 No 4 2
NEW 3 0
Type Up Down
Hardware 2 2
Software 3 3
Gini age (D) =