K-Means is famous clustering with unsupervised learning that divides data into K cluster(s), each cluster has its own centroid which's the center of the cluster. The distribution of data to cluster depends on the distance between data to the centroid. The data will join to the cluster who has minimum distance with the centroid. After that, the centroid will update to new centroid by averaging all data in its cluster. This happened until the end of the iteration.
How to do
change the param's value in const
go run kmeans.go
Step
initial centroid, determine the initial value of centroid
grouping, the datas will join to nearest cluster by calculating between data points to each centroid
update centroid, update centroid base on calculation towards its new data
repeat step 2-3 until end of iteration
evaluate model, determine the quality of model
Output
*.cluster.json, to show model result with data in it