This section discusses the nearest neighbors regression.
Nearest neighbors regression
How it works…
Neighbors-based regression can be used in cases where the data labels are continuous, rather than discrete, variables. The label assigned to a query point is computed based on the mean of the labels of its nearest neighbors.
Scikit-learn implements two different neighbors regressors: KNeighborsRegressor implements learning based on the K nearest neighbors of each query point, where K is an integer value specified by the user. RadiusNeighborsRegressor implements learning based on the neighbors within a fixed radius r of the query point, where r is a floating-point value specified by the user.
The basic nearest neighbors...