Calmcode - scikit learn: scale

The effect of scale in Scikit-Learn

1 2 3 4 5 6 7 8 9 10

You can create the same plot by running this code;

from sklearn.neighbors import KNeighborsRegressor
from sklearn.datasets import load_boston
import matplotlib.pylab as plt

X, y = load_boston(return_X_y=True)

mod = KNeighborsRegressor().fit(X, y)
pred = mod.predict(X)
plt.scatter(pred, y)