SLIQ_Algorithm_with_Example
SLIQ_Algorithm_with_Example
Steps in SLIQ:
Pre-sort each attribute once.
Initialize a 'class list' with record ID, class label, and node number.
Choose the best split based on Gini index using sorted attributes.
Split the class list based on the selected attribute.
Repeat recursively for each child node.
Stop when nodes are pure or meet stopping conditions.
Example Dataset:
ID Age Income (K) Class
1 22 25 No
2 45 50 Yes
3 27 30 No
4 35 45 Yes
5 50 60 Yes
Attributes Pre-Sorted:
ID Class Node
1 No 0
2 Yes 0
3 No 0
4 Yes 0
5 Yes 0
Gini(Left) = 0
Gini(Right) = 0
Weighted Gini = 0
Summary Table:
Split Condition Left Group Right Group Gini Split Remarks
Age <= 30.0 2 records (No) 3 records (Yes) 0.0 Best Split