码迷,mamicode.com
首页 > 其他好文 > 详细

2.9 Model Selection and the Bias–Variance Tradeoff

时间:2015-08-14 01:00:23      阅读:126      评论:0      收藏:0      [点我收藏+]

标签:

结论

  • 模型复杂度↑Bias↓Variance↓

  • 技术分享

例子

  • $y_i=f(x_i)+\epsilon_i,E(\epsilon_i)=0,Var(\epsilon_i)=\sigma^2$
    使用knn做预测,在点$x_0$处的Excepted prediction error:
    $EPE(x_0)=E\left[\left(y_0-\hat{f}(x_0)\right)^2|x_0\right]\\ \ \ =E\left[\left(y_0-E(y_0)\right)^2|x_0\right]+\left[E(\hat{f}(x_0))-E(y_0)|x_0\right]^2+E\left[\hat{f}(x_0)-E(\hat{f}(x_0))\right]^2\\ \ \ =\sigma^2+{Bias}^2(\hat{f}(x_0))+Var(\hat{f}(x_0))\\ \ \ =\sigma^2+\left[f(x_0)-\frac{1}{k}\sum_l^k y_l\right]^2+\frac{\sigma^2}{k}$
    k↑在训练集上的表现(考虑k=1,k=2)↓模型复杂度(模型越复杂,在训练集上的表现越好)↓

2.9 Model Selection and the Bias–Variance Tradeoff

标签:

原文地址:http://www.cnblogs.com/porco/p/4728807.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!