Coursera 吴恩达 Machine Learning 课程 week 5 Quiz

编程作业代码 GitHub 地址:https://github.com/coco-1998-2/Andrew-NG-Machine-Learning-Coursera

100%本地运行通过,不要直接抄,debug有问题的时候参考下就好。若是感觉有用,别忘记Star哦~

 

  • 可以有负数
  • 减去平均值,除以(max-min)

 

  • J值增加,说明 a 取值过大       

 

  • 数据量与特征数量都不大,可以直接选用normal equation 

  •  特征变量数量大于一万,Normal equation 运算会比较慢,应考虑用梯度下降

 

 Backpropagation Algorithm 视频中嵌入问题:

 

练习1
Which of the following statements about diagnostics are true?Check all that apply.
A.It's hard to tell what will work to improve a learning algorithm, so the best approach is to go with gut feeling and just see what works.
B.Diagnostics can give guidance as to what might be more fruitful things to try to improve a learning algorithm.
C.Diagnostics can be time-consuming to implement and try,but they can still be a very good use of your time.
D.A diagnostic can sometimes rule out certain courses of action (changes to your learning algorithm) as being unlikely to improve its performance significantly.
Answer:B、C、D
分析:
A.瞎猜改进算法显然是不行的。
B.诊断能够帮助我们提高算法性能对的。
C.诊断虽然也会花费不长的时间,但是这时间是花的值得的。
D.诊断有时候是直接改变算法而不是提高性能,这样说当然也行。

 

Gradient Checking:

 

Random Initialization: 

  

 

Suppose you are using gradient descent together with backpropagation to try to minimize J(Θ) as a function of Θ. Which of the following would be a useful step for verifying that the learning algorithm is running correctly?

A) Plot J(Θ) as a function of Θ, to make sure gradient descent is going downhill.

B) Plot J(Θ) as a function of the number of iterations and make sure it is increasing (or at least non-decreasing) with every iteration.

C)Plot J(Θ) as a function of the number of iterations and make sure it is decreasing (or at least non-increasing) with every iteration.

D) Plot J(Θ) as a function of the number of iterations to make sure the parameter values are improving in classification accuracy.

答案应该选择C。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章