李宏毅老师机器学习第一课Linear regression

机器学习就是让机器学会自动的找一个函数

学习图谱:

李宏毅老师机器学习第一课Linear regression_第1张图片

 

1.regression

example appliation

estimating the combat power(cp) of a pokemon after evolution.

                                                 李宏毅老师机器学习第一课Linear regression_第2张图片

 

 varibles:Xcp  ,Xs  ,Xhp  ,Xw  ,Xh

model:

             f(Xcp  ,Xs  ,Xhp  ,Xw  ,Xh)=y(cp after evolution)

linear model :

              y=b+∑WiXi

Xi  an  attribute of input x feature             Wi   weight               b  bias

Loss function :   input a function   output  how  bad it is

          L(f)=L(b,w)=∑(ytrue-(b+∑WiXi))2

target :  best funcation:    f*=argminL(f)

Gradient Descent:

1.randomly pick an initial value w0 b0

2.compute   ∂L ⁄∂W|W=W0,b=b0    ∂L ⁄∂b|W=W0,b=b0

3.compute   W1=W0-Π( ∂L ⁄∂W|W=W0,b=b0)     b1=b0-Π( ∂L ⁄∂b|W=W0,b=b0)

 Π is called "learning rate"

linear model not exist local optimal

overfitting : a more complex model does not always lead to  better performance on testing dataLoss function Regularization:

         L(f)=L(b,w)=∑(ytrue-(b+∑WiXi))2(Wi)2

the function with smaller Wi are better

why?

if some noises corrupt input Xi when testing. A  smoother function has less influence.

 

你可能感兴趣的:(李宏毅老师机器学习第一课Linear regression)