Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
162 B
3
Indexable
Never
m, b, cost = linear_regression(x ** 2,y)

y_pred = m * x ** 2 + b

plt.scatter(x, y, color='blue')
plt.plot(x, y_pred, 'r-')

print('MSE: {}'.format(cost))