kmeans

command
v0.0.0-...-2e276fd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 28, 2021 License: MIT Imports: 10 Imported by: 0

README

K-Means

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
  1. initial centroid, determine the initial value of centroid

  2. grouping, the datas will join to nearest cluster by calculating between data points to each centroid

  3. update centroid, update centroid base on calculation towards its new data

repeat step 2-3 until end of iteration

  1. evaluate model, determine the quality of model
Output
  • *.cluster.json, to show model result with data in it
  • *.graph.json, to show model quality in graph

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL