机器学习(Machine Learning)- 吴恩达(Andrew Ng) 学习笔记(十)
Advice for applying machine learning Decide what to try next Debugging a learning algorithm 调试学习算法 Suppose you have implemented regularized linear regression to predict housing prices. \[ J(\theta) = \frac{1}{2m} \left[ \sum_{i=1}^m(h_\theta(x^{(i)}) - y^{(i)})^2 + \lambda\sum_{j=1}^m\theta_j^2 \right] \] However, when you test your hypothesis on a new set of houses, you find that it makes unacceptably large errors in its predictions. What should you try next? 假如你已经完成了房价预测的正则化线性回归(也就是最小化代价函数 \(J\) 的值),然而在你测试新的样例时发现产生了巨大的误差。要想改进这个算法你该怎么办? 可选的方法: Get more training examples 用更多的训练样本(收集样本耗费太大精力)