Advertisement
Guest User

Untitled

a guest
May 21st, 2018
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.44 KB | None | 0 0
  1. from sklearn.linear_model import LinearRegression
  2. from sklearn.metrics import mean_squared_error
  3. M = [[0] * len(x) for i in range(len(y))]
  4. lr2 = LinearRegression()
  5. lr2.fit(x, y)
  6. y2 = lr2.predict(x)
  7. plt.figure()
  8. #plt.plot(xx[f:t], y[f:t], color='r', linewidth=4, label='y')
  9. #plt.plot(xx[f:t], y2[f:t], color='b', linewidth=2, label='predicted y')
  10. #plt.ylabel('Target label')
  11. #plt.xlabel('Line number in dataset')
  12. #plt.legend(loc=4)
  13. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement