线性回归

线

分别使用sklearn中的LinearRegression和梯度下降对数据进行拟合。Sklearn中的线性回归使用最小二乘法,可以使损失函数最小化,而梯度下降只能不断逼近最小值,从运行结果中可以看出200次迭代后损失已经和最小二乘法很接近了。

About the author

1 Comment

回复 Twicsy Cancel reply

By zhao

zhao

Get in touch

Quickly communicate covalent niche markets for maintainable sources. Collaboratively harness resource sucking experiences whereas cost effective meta-services.