课上习题

【1】代价函数

【原】Coursera—Andrew Ng机器学习—Week 5 习题—Neural Networks learning-LMLPHP

【2】代价函数计算

【原】Coursera—Andrew Ng机器学习—Week 5 习题—Neural Networks learning-LMLPHP

【3】

【原】Coursera—Andrew Ng机器学习—Week 5 习题—Neural Networks learning-LMLPHP

【4】矩阵的向量化

【原】Coursera—Andrew Ng机器学习—Week 5 习题—Neural Networks learning-LMLPHP

【5】梯度校验

【原】Coursera—Andrew Ng机器学习—Week 5 习题—Neural Networks learning-LMLPHP

Answer:(1.01-0.99/ 0.02 = 3.001

【6】梯度校验

【原】Coursera—Andrew Ng机器学习—Week 5 习题—Neural Networks learning-LMLPHP

Answer:学习的时候要去掉梯度校验,不然会特别慢

【7】随机初始化

【原】Coursera—Andrew Ng机器学习—Week 5 习题—Neural Networks learning-LMLPHP

Answer:对于神经网络这种复杂模型来说,初始值都是同一个值 r,不然第二层会全都一样。

【8】梯度下降

【原】Coursera—Andrew Ng机器学习—Week 5 习题—Neural Networks learning-LMLPHP


测验

【原】Coursera—Andrew Ng机器学习—Week 5 习题—Neural Networks learning-LMLPHP

Answer: A

【原】Coursera—Andrew Ng机器学习—Week 5 习题—Neural Networks learning-LMLPHP

Answer:A

【原】Coursera—Andrew Ng机器学习—Week 5 习题—Neural Networks learning-LMLPHP

Answer:D

3*(1.01) - 3*(0.99) / 0.02

【原】Coursera—Andrew Ng机器学习—Week 5 习题—Neural Networks learning-LMLPHP

【原】Coursera—Andrew Ng机器学习—Week 5 习题—Neural Networks learning-LMLPHP

【原】Coursera—Andrew Ng机器学习—Week 5 习题—Neural Networks learning-LMLPHP

Answer:ACE

解析E:与逻辑回归一样,λ的较大值将惩罚大参数值,从而减少过度拟合训练集的变化。

解析G:  一个特别大的 λ 可能是非常有害的。 如果将其设置得太大,那么网络将不适合训练数据,并且对训练数据和新的测试数据的预测都很差。

【原】Coursera—Andrew Ng机器学习—Week 5 习题—Neural Networks learning-LMLPHP

【原】Coursera—Andrew Ng机器学习—Week 5 习题—Neural Networks learning-LMLPHP

Answer:ADG

05-11 20:14