- K-nearest neighbors (KNN) is a type of supervised learning algorithm used for both regression and classification.
- KNN tries to predict the correct class for the test data by calculating the distance between the test data and all the training points.
- Then select the K number of points which is closet to the test data.
Creator: Anandan Raju
Synopsis
- Import Packages
- Load Dataset
- Summarize DataSet
- Mapping Salary Data to Binary Value
- Segregate Dataset into X & Y
- Feature Selection
- Splitting Dataset into Train & Test
- Feature Scaling
- Training
- Prediction
- Accuracy Score
- Prediction Output