The k-Nearest Neighbors (k-NN) algorithm is a form of supervised machine learning that is used to predict categories. In this chapter, you will learn about the following:
- Preparing a dataset for machine learning with scikit-learn
- How the k-NN algorithm works under the hood
- Implementing your first k-NN algorithm to predict a fraudulent transaction
- Fine-tuning the parameters of the k-NN algorithm
- Scaling your data for optimized performance
The k-NN algorithm has a wide range of applications in the field of classification and supervised machine learning. Some of the real-world applications for this algorithm include predicting loan defaults and credit-based fraud in the financial industry and predicting whether a patient has cancer in the healthcare industry.
This book's design facilitates the implementation of a robust machine...