線性迴歸 Python實現

1 import numpy as np 2 import pylab 3 4 5 def plot_data(data, b, m): 6 x = data[:, 0] 7 y = data[:, 1] 8 y_predict = m*x + b 9 pylab.plot(x, y_predict, 'k-') 10 pylab.plo
相關文章
相關標籤/搜索