You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*`B`[NanoNeuron](https://github.com/trekhleb/nano-neuron) - 7 simple JS functions that illustrate how machines can actually learn (forward/backward propagation)
145
+
*`B`[NanoNeuron](https://github.com/trekhleb/nano-neuron) - 7 simple JS functions that illustrate how machines can actually learn (forward/backward propagation)
146
+
*`B`[KNN](src/algorithms/ML/KNN) - K Nearest Neighbors
146
147
***Uncategorized**
147
148
*`B`[Tower of Hanoi](src/algorithms/uncategorized/hanoi-tower)
KNN stands for K Nearest Neighbors. KNN is a supervised Machine Learning algorithm. It's a classification algorithm, determining the class of a sample vector using a sample data.
4
+
5
+
The idea is to calculate the similarity between two data points on the basis of a distance metric. Euclidean distance is used mostly for this task. The algorithm is as follows -
6
+
7
+
1. Check for errors like invalid data/labels.
8
+
2. Calculate the euclidean distance of all the data points in training data with the classification point
9
+
3. Sort the distances of points along with their classes in ascending order
10
+
4. Take the initial "K" classes and find the mode to get the most similar class
11
+
5. Report the most similar class
12
+
13
+
Here is a visualization for better understanding -
0 commit comments