Answers for "python regeression line"

0

python regeression line

x = np.array([1, 2, 3, 4])
y = np.array([ 2, 8, 3, 6 ])

plt.plot(x, y, 'o')

m, b = np.polyfit(x, y, 1)
plt.plot(x, m*x + b)
Posted by: Guest on August-06-2021

Python Answers by Framework

Browse Popular Code Answers by Language