转自:https://www.jianshu.com/p/c7e642877b0e 梯度下降法,思想及代码解读. import numpy as np # Size of the points dataset. m = 20 # Points x-coordinate and dummy value (x0, x1). X0 = np.ones((m, 1))#返回一个m行1列的矩阵 X1 = np.arange(1, m+1).reshape(m, 1)#相当于是转置了 X = np.hsta