├── README.md └── knn algo.docx /README.md: -------------------------------------------------------------------------------- 1 | ##K Nearest Neighbors with Python|ML## 2 | 3 | How It Works ? 4 | 5 | K-Nearest Neighbors is one of the most basic yet essential classification algorithms in Machine Learning. 6 | It belongs to the supervised learning domain and finds intense application in pattern recognition, data mining and intrusion detection. 7 | ->The K-Nearest Neighbors (KNN) algorithm is a simple, easy-to-implement supervised machine learning algorithm that can 8 | be used to solve both classification and regression problems. 9 | 10 | ->The KNN algorithm assumes that similar things exist in close proximity. In other words, similar things are near to each other. 11 | KNN captures the idea of similarity (sometimes called distance, proximity, or closeness) with some mathematics we might have 12 | learned in our childhood— calculating the distance between points on a graph. There are other ways of calculating distance, 13 | and one way might be preferable depending on the problem we are solving. However, the straight-line distance (also called the Euclidean distance) 14 | is a popular and familiar choice. 15 | ->It is widely disposable in real-life scenarios since it is non-parametric, meaning, it does not make any underlying assumptions 16 | about the distribution of data (as opposed to other algorithms such as GMM, which assume a Gaussian distribution of the given data). 17 | 18 | Pre-requisites: Numpy, Pandas, matplotlib, sklearn 19 | 20 | ->We’ve been given a random data set with one feature as the target classes. 21 | We’ll try to use KNN to create a model that directly predicts a class for a new data point based off of the features. 22 | -------------------------------------------------------------------------------- /knn algo.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mallikarjunyadav27/knn-algorithm/99ea9147a84f9010f3abe15734ddd1bcc1d19bcf/knn algo.docx --------------------------------------------------------------------------------