- Mastering Machine Learning with scikit-learn(Second Edition)
- Gavin Hackeling
- 71字
- 2025-04-04 18:47:42
Classification and Regression with k-Nearest Neighbors
In this chapter, we will introduce k-Nearest Neighbors (KNN), a simple algorithm that can be used for classification and regression tasks. KNN's simplicity belies its power and usefulness; it is widely used in the real world in a variety of applications, including search and recommender systems. We will compare and contrast KNN with simple linear regression and work through toy problems to understand the model.