误差 estimator
Error:
1)靶心没有瞄准:bias有偏移
2)瞄准位置但有偏移:variance有偏移
不同宇宙的f* 不一样
设y=b+w* xcp
简单的model(small variance,large bias)受到data的影响小(分布小,但靶心有差距)
较复杂的model(small bias,large variance)每次的f*都不太一样,但平均下来在靶心附近
Bias E [f * ]=- f,if we average all the f *,is it close to ^f
*What to do with large bias?
- (underfitting)if your model cannot even fit the training examples, then you have large bias
- (overfitting)if you can fit the training data, but large error on testing data, then you probably have large variance
*For bias, redesign your model
- Add more features as input
- A more complex model
*What to do with large variance
- More data: very effective but not always practical
- Regularization: 但是很多时候不一定能做到收集更多的data。可以针对对问题的理解对数据集做调整。比如识别手写数字的时候,偏转角度的数据集不够,那就将正常的数据集左转15度,右转15度,类似这样的处理。
Model selection
There is usually a trade-off between bias and variance
Select a model that balabces two kinds of error to minimize total error
交叉验证
n折交叉验证