A decision tree recursively partitions the input space with (feature, threshold) splits; the splitting criterion measures split quality. Entropy:
H(D)=−∑k=1Kpklog2pk; Gini impurity:
G(D)=1−∑k=1Kpk2, which reduces to
G=2p(1−p) in binary classification (max 0.5 at
p=0.5). The CART classifier greedily picks the feature
A and split point
v maximizing the Gini decrease
ΔG(A,v)=G(D)−∣D∣∣DL∣G(DL)−∣D∣∣DR∣G(DR), where
DL={x∣xA≤v} and
DR=D∖DL. ID3 uses information gain
Gain(D,A)=H(D)−∑v=1V∣D∣∣Dv∣H(Dv), which favors many-valued features (finer partitions lower
H(Dv)); C4.5 uses the gain ratio
Gain_ratio(D,A)=IV(A)Gain(D,A) with intrinsic value
IV(A)=−∑v=1V∣D∣∣Dv∣log2∣D∣∣Dv∣ to penalize the number of values; CART is always binary (one threshold per split), using Gini for classification and variance reduction
err(D)=∣D∣1∑i∈D(yi−yˉD)2 for regression. Continuous features: after sorting, only midpoints
2x(i)+x(i+1) of adjacent samples are candidate split points (any threshold is equivalent to the midpoint of the cell it falls into), at most
n−1 candidates,
O(nlogn) per feature.