Professional Documents
Culture Documents
# Maximization step
for each cluster:
update the centroid by calculating the mean of data points assigned to
the cluster
if attributes is empty:
return a leaf node labeled with the majority class in dataset
if subset is empty:
add a leaf node labeled with the majority class in dataset
else:
add the result of ID3(subset, targetAttribute, attributes) as a child
of the branch
return node N