y = groupall.values[:, 2:] x = range(np.shape(y)[1]) plt.plot(x, y[0], "b.") x2 = np.array(x).reshape(-1,1) y2 = np.array(y[0]).reshape(-1,1) plt.plot(x2, y2, "r.") sgd_reg2 = SGDRegressor(n_iter_no_change=5000, penalty=None, eta0=0.1, random_state=42, max_iter=100000) sgd_reg2.fit(x2, y2.ravel()) y_predict = sgd_reg2.predict(x2) plt.plot(x2, y_predict, "y-") print(y_predict) y = groupall.values[:, 2:] x = range(np.shape(y