摘要: 对于癌症检测的例子来说,y=1代表有癌症(1代表数目比较小的类) Precision/Recall \[\Pr ecision = \frac{{True \bullet positive}}{{predicted \bullet positive}} = \frac{{True \bullet p 阅读全文
posted @ 2018-11-01 10:07 qkloveslife 阅读(1411) 评论(0) 推荐(0) 编辑
摘要: Rcommended approach Start with a simple algorithm that you can implement quickly. Implement it and test it on your cross-validation data. Plot learnin 阅读全文
posted @ 2018-11-01 09:12 qkloveslife 阅读(700) 评论(0) 推荐(0) 编辑
摘要: “Small” neural network (fewer parameters; more prone to underfitting) Computationally cheaper "Large" neural network (more parameters; more prone to o 阅读全文
posted @ 2018-11-01 02:07 qkloveslife 阅读(315) 评论(0) 推荐(0) 编辑
摘要: 学习曲线 “训练误差”和“交叉验证误差”如下 \[\begin{array}{l}{J_{train}}\left( \theta \right) = \frac{1}{{2{m_{train}}}}\sum\limits_{i = 1}^{{m_{train}}} {{{\left( {{h_\t 阅读全文
posted @ 2018-11-01 01:52 qkloveslife 阅读(352) 评论(0) 推荐(0) 编辑
摘要: 正则化后的线性回归模型 模型 \[{h_\theta }\left( x \right) = {\theta _0} + {\theta _1}x + {\theta _2}{x^2} + {\theta _3}{x^3} + {\theta _4}{x^4}\] \[J\left( \theta 阅读全文
posted @ 2018-10-31 20:25 qkloveslife 阅读(2519) 评论(0) 推荐(0) 编辑
摘要: 以下两个图是比较熟悉的高偏差(high bias)与高方差(high variance)的图 \[{h_\theta }\left( x \right) = {\theta _0} + {\theta _1}x\] \[{h_\theta }\left( x \right) = {\theta _0 阅读全文
posted @ 2018-10-31 19:46 qkloveslife 阅读(977) 评论(0) 推荐(0) 编辑
摘要: 对于过拟合现象 \[{h_\theta }\left( x \right) = {\theta _0} + {\theta _1}x + {\theta _2}{x^2} + {\theta _3}{x^3} + {\theta _4}{x^4}\] Once parameters θ0,θ1,θ2 阅读全文
posted @ 2018-10-31 19:14 qkloveslife 阅读(2534) 评论(0) 推荐(0) 编辑
摘要: 当你的假设函数有很低的“训练错误”(training error)的时候,它不一定是个好的假设函数 如 \[{h_\theta }\left( x \right) = {\theta _0} + {\theta _1}x + {\theta _2}{x^2} + {\theta _3}{x^3} + 阅读全文
posted @ 2018-10-31 15:48 qkloveslife 阅读(1794) 评论(0) 推荐(0) 编辑
摘要: 调试一个算法 假设你实现了一个用来预测房价的线性回归算法,你的目的是最小化代价函数 \[J\left( \theta \right) = \frac{1}{{2m}}\left[ {\sum\limits_{i = 1}^m {{{\left( {{h_\theta }\left( {{x^{\le 阅读全文
posted @ 2018-10-31 15:13 qkloveslife 阅读(238) 评论(0) 推荐(0) 编辑
摘要: Training a Neural Network Randomly initialize the weights Implement forward propagation to get hΘ​(x(i)) for any x(i) Implement the cost function Impl 阅读全文
posted @ 2018-10-29 22:08 qkloveslife 阅读(1002) 评论(0) 推荐(0) 编辑