Machine Learning|吴恩达 公式总结(1)
多元线性回归(Multivariate Linear Regression)
【原课程地址:https://www.coursera.org/learn/machine-learning/home/welcome。本系列笔记只关注课程中涉及的算法公式。因为课程中对许多算法只提及结果不进行过程推导。而本人数学较差,微积分、概率统计这些当初让人伤感的课程现在感觉就仿佛从没学过一样。但通过自己推导过的相关算法过程,尽量在理解清晰的情况下展现记录下来,以供类似我这样数学水平的后来者可以参考。】
申明:
x(i)j x j ( i ) =第 ith i t h 个训练样本的第j个特征(value of feature j in the ith i t h training)
x(i) x ( i ) =第 ith i t h 训练样本,含其所有特征(the input (features) of the ith i t h training )
m m = 训练样本的总数(the number of training examples)
= 特征总数(the number of features)
x(i)∈R(n);1<j≤n;1<i≤m x ( i ) ∈ R ( n ) ; 1 < j ≤ n ; 1 < i ≤ m
方程式:
假设(Assume): xi0=1;x(i)∈R(n+1) x 0 i = 1 ; x ( i ) ∈ R ( n + 1 )
方程式的向量表述(vector presentation):
损失函数(cost function):
梯度下降公式(Gradient Descent):
( xi0=1 x 0 i = 1 )
偏导推导过程(partial derivative work processes):
e.g.,[(ax+b)n]′=n(ax+b)⋅(ax+b)′=an(ax+b) e . g . , [ ( a x + b ) n ] ′ = n ( a x + b ) ⋅ ( a x + b ) ′ = a n ( a x + b )
∂∂θj[(hθ(x(i))−y(i))2]′=2⋅(hθ(x(i))−y(i))⋅∂∂θj(hθ(x(i))−y(i))′ ∂ ∂ θ j [ ( h θ ( x ( i ) ) − y ( i ) ) 2 ] ′ = 2 ⋅ ( h θ ( x ( i ) ) − y ( i ) ) ⋅ ∂ ∂ θ j ( h θ ( x ( i ) ) − y ( i ) ) ′
=2⋅(hθ(x(i))−y(i))⋅∂