版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_40883132/article/details/83243754
具体代码请参照GitHub:https://github.com/RobertWang2/Python-/tree/master/ml-class-ex/machine-learning-ex1
本次是运用梯度下降法
红色的是数据集,蓝色的是线性回归方程
costFunction:代价函数,希望越小越好
红色的位置 就是理想的参数值