分類演算法(classification algorithm)是資料探勘中重要的分析方法。針對以下的訓
練資料集:9 筆資料x1, x2, . . . , x9,每筆資料有4 個屬性(A1, A2, A3, Class),其中
A1、A2、A3 為特徵屬性(feature),Class 為類別屬性。
現今希望用決策分類樹(decision tree)來學習該資料集的分類規則,其中分類樹內部
節點(internal node)屬性以選擇最小的Gini(A)值來決定分支,Gini(A)函數定義如下:
ID
A1
A2
A3
Class
x1
S
2
Y
C1
x2
B
2
Y
C1
x3
B
1
Y
C1
x4
S
1
Y
C1
x5
S