Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from sklearn.linear_model import LinearRegression
- from sklearn.metrics import mean_squared_error
- M = [[0] * len(x) for i in range(len(y))]
- lr2 = LinearRegression()
- lr2.fit(x, y)
- y2 = lr2.predict(x)
- plt.figure()
- #plt.plot(xx[f:t], y[f:t], color='r', linewidth=4, label='y')
- #plt.plot(xx[f:t], y2[f:t], color='b', linewidth=2, label='predicted y')
- #plt.ylabel('Target label')
- #plt.xlabel('Line number in dataset')
- #plt.legend(loc=4)
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement