MIT ML 听课笔记(一)

来源:互联网 发布:catdrawing转换软件 编辑:程序博客网 时间:2024/04/29 21:08

machine Learning : 

  • supervised learning ; 
  • unsupervised Learning


supervised learning:对于数据集中的每个数据,都有相应的正确答案。算法就是基于这些来做出预测。



  1.regression problem (predict continuous valued output):


Regression is a ML task where T has a real-valued outcome on some continuous sub-space 


  2.classification problem (预测是否为某种离散值)


Classification is a ML task where T has a discrete set of outcomes

    



m=number of training examples

xs= input variable/features

ys=output variable/target variable


     (x,y) one training example


:=means assignment.  


a:=b means take the value in b and use it overwrite whatever value is a . This means set a to be equal to the value of b, which is assignment.



运用梯度下降的两个技巧:


  1. feature scaling :特征缩放(讲特征范围控制在-3—3


mean normalization replace xi with xi-ui to make features have approximately zero mean


x <-  x-u/s

u: average value of x in training set

s: range(max-min)

不需要太精确,只是为了让梯度下降法更快



2.

如何确保梯度下降算法work correctly

for sufficiently small alpha, j-theta should decrease on every iteration. cost一直在减小)

所以如果j(theta)变大或者没有一直变小,往往是learning rate太大了,需要变小。

如果alpha过于小,那就会收敛的很慢。


0 0
原创粉丝点击