Machine learning 编程练习ex5错误

ex5

在learningCurve.m和validationCurve.m里面出现了错误:
pdf教程中有一句话:

意思是在计算训练误差和测试误差时不应该包含正则化项,即linearRegCostFunction中的lambda应该等于0.但是在训练时trainLinearReg中的lambda是多少就是多少。所以有下面的代码:

---

此外

论坛中也提到了这个事:Programming Exercise Tutorials (list)(https://www.coursera.org/learn/machine-learning/discussions/all/threads/m0ZdvjSrEeWddiIAC9pDDA

在ex5的learningCurve() tutorial (really just a set of tips)中这样说的:

猜你喜欢

转载自www.cnblogs.com/Ireland/p/12482970.html
今日推荐