Day1 机器学习基本概念和梯度下降

机器学习定义

  Arthur Samuel:the field of study that gives computers the ability to learn without being explicitly programmed.

  Tom Mitchell:A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P, if its performance at tasks in T, as measured by P, improves with experience E.

机器学习常用算法

  监督学习(Supervised learning):To predict the result by analyzing some correct relationship between the input and the output.模型如下:

                

    回归问题("regression"):we are trying to predict results within a continuous output.

    分类问题("classification"): we are instead trying to predict results in a discrete output. 

  非监督学习(Unsupervised learning):To approach problems with little or no idea what our results should look like. 

代价函数Cost Function

  A function used to measure the accuracy of our hypothesis function.

  We can use a cost function like

           

  Our target is to find a value of θ0 and θ1 to  get the min J

 梯度下降算法Gradient Descent Algorithm

   repeat until convergence:{

            

      }

    α : 学习速率(learning rate).

      if α is too small,gradient descent can be slow .

      if α is too large,gradient descent can overshoot the minimum.It may fail to converge,or even diverge.

  算法中θ0和θ1是同时改变的:

             

 

 

posted @ 2018-02-06 21:11  挤成肉夹馍  阅读(115)  评论(0编辑  收藏  举报