RadiusNeighborsRegressor

Wrapper for RadiusNeighborsRegressor.

class RadiusNeighborsRegressor(**kwargs)[source]

Bases: NeighborsRegressor

Radius Neighbors Regressor for multidimensional approximation.

Parameters:

kwargs – arguments passed to the internal instance of RadiusNeighborsRegressor.

Example:
>>> import numpy as np
>>> from ezyrb import RadiusNeighborsRegressor
>>> x = np.random.uniform(-1, 1, size=(20, 2))
>>> y = np.sin(x[:, 0]) * np.cos(x[:, 1])
>>> rnn = RadiusNeighborsRegressor(radius=0.5)
>>> rnn.fit(x, y)
>>> new_x = np.array([[0.0, 0.0]])
>>> y_pred = rnn.predict(new_x)

Initialize a Radius Neighbors Regressor.

Parameters:

kwargs – Arguments passed to sklearn’s RadiusNeighborsRegressor.

_abc_impl = <_abc._abc_data object>