kNN algorithm - Go Language
What is kNN algorithm
kNN is a machine-learning algorithm used to classify each item of the testing data into a group (one of
two, in this case, because we have two training sets) based on which group has the majority of the item’s
k neighbors. For this program, we’ll let k = 3. Note that the testing data is not being added to either
training set, just classified.
What should we know? Situation
Assume we are in a city, and the city has three police offices,
and some police man walking everywhere.
Now, the police offices need some of police mans back to offices because they need a important meeting,
So, the program will help them to find k police man what is short distance to back to office.
(for the program, every office just needs 3 polices, so the k is 3)
Also, we can use the kNN algorithm for some way, such as, it helps customers to find the nearest supermarket.
How to run?
- run generator.go to generator two csv files that include two sets points.
- run main.go to get some results that include a map
Team member:
GitHub Link:
https://github.com/blueandhack/K-Go
Website:
https://blueandhack.com/K-Go/