Untitled
unknown
plain_text
2 years ago
162 B
9
Indexable
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))Editor is loading...
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))