zoukankan      html  css  js  c++  java
  • 李宏毅老师机器学习第一课Linear regression

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

    学习图谱:

    1.regression

    example appliation

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

                                                    

     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.

  • 相关阅读:
    js中undefined,null,NaN的区别
    js中数字计算精度
    BestCoder Round #32
    POJ 2299 求逆序对(归并排序或树状数组)
    POJ 2603
    CodeForces 515C
    POJ 1853 背包问题
    UVA 10115 子符串替换
    POJ 1155 树状dp
    HDU 2196 树状dp 求树中节点之间的最长距离
  • 原文地址:https://www.cnblogs.com/SAM-CJM/p/13760626.html
Copyright © 2011-2022 走看看