This is a repository of my learnings of Machine learning. This includes a lot items I learned during the summer at coding blocks. This is the beginning of my journey into Machine Learning. I will try o explain each concept to the best of my abilities. If needed you can always contact me or create a pull request.
Instructors : @shubham1810
The k-nearest neighbors (KNN) algorithm is a simple, easy-to-implement supervised machine learning algorithm that can be used to solve both classification and regression problems.The KNN algorithm assumes that similar things exist in close proximity. In other words, similar things are near to each other. This is based on the proverb, "Who and what we surround ourselves with is who and what we become. In the midst of good people, it is easy to be good. in the midst of bad people, it is easy to be bad.”
Notice in the image above that most of the time, similar data points are close to each other. The KNN algorithm hinges on this assumption being true enough for the algorithm to be useful. KNN captures the idea of similarity (sometimes called distance, proximity, or closeness) with some mathematics we might have learned in our childhood— calculating the distance between points on a graph.
In my implementation, I have used a simple algorithm to find out distance between two points i.e. .