(1)Linear Regression with One Variable

来源:互联网 发布:数据透视 不显示空白 编辑:程序博客网 时间:2024/06/07 06:32

以下内容源自coursera上的machine learning,同时参考了Rachel-Zhang的博客(http://blog.csdn.net/abcjennifer)







































梯度算法有两种:

(1)batch gradient descent(批量梯度下降)

(2)stochastic gradient descent(随机梯度下降)

参考http://cs229.stanford.edu/notes/cs229-notes1.pdf(P5-P7)

 

最后是拓展:


第一点:利用的另一种方法就是normal equation,不用迭代直接算出令cost function最小的参数theta,但是这个只适合特征比较小的(比如n=100,n=1000对于当代计算机的性能都是比较小的,当n=10000,n=100000就是比较大的)

第二点:对于很多特征特征需要用gradient descent,而不是normal equation


原创粉丝点击