NeighborsRegressor

Module for generic NeighborsRegressor.

NeighborsRegressor

A generic superclass for wrappers of *NeighborsRegressor from sklearn.

NeighborsRegressor.fit

Construct the interpolator given points and values.

NeighborsRegressor.predict

Evaluate interpolator at given new_points.

class NeighborsRegressor[source]

Bases: Approximation

A generic superclass for wrappers of *NeighborsRegressor from sklearn.

Parameters:

kwargs – arguments passed to the internal instance of *NeighborsRegressor.

_abc_impl = <_abc._abc_data object>
fit(points, values)[source]

Construct the interpolator given points and values.

Parameters:
  • points (array_like) – the coordinates of the points.

  • values (array_like) – the values in the points.

predict(new_point)[source]

Evaluate interpolator at given new_points.

Parameters:

new_points (array_like) – the coordinates of the given points.

Returns:

the interpolated values.

Return type:

numpy.ndarray