当前位置:网站首页>1.2 - error sources
1.2 - error sources
2022-08-11 07:51:00 【A big boa constrictor 6666】
文章目录
一、The bias and variance of the estimator(Bias and Variance of Estimator)
- 误差(error)的来源:Bias and variance(Bias and Variance)
- 估计量(Estimator):We found based on the training set f ∗ f^* f∗ 就是真实 f ^ \hat{f} f^的估计量
- 估计变量x的均值
- 假设x的均值是u
- 假设x的方差是 σ 2 \sigma ^2 σ2
- 估计均值u
- 取N个点:{ x 1 , x 2 , . . . , x N x^1,x^2,...,x^N x1,x2,...,xN}
- m = 1 N ∑ n x n ≠ u m=\frac{1}{N}\underset{n}{\sum }x^n\neq u m=N1n∑xn=u
- E [ m ] = E [ 1 N ∑ n x n ] = 1 N ∑ n E [ x n ] = u E\left [ m\right]=E\left [ \frac{1}{N}\underset{n}{\sum }x^n \right ]=\frac{1}{N}\underset{n}{\sum }E\left [ x^n\right ]=u E[m]=E[N1n∑xn]=N1n∑E[xn]=u,虽然每一个mare spread evenly in the realu的四周,But after taking the average of them, it is equalu
- 散布程度: V a r [ m ] = σ 2 N Var[m]=\frac{\sigma ^2}{N} Var[m]=Nσ2,Var为取m的方差,Its value depends on the number of samples.N越大,The tighter the spread;N越小,Scatter more sparsely.
- 估计方差 σ 2 \sigma ^2 σ2
- s 2 = 1 N ∑ n ( x n − m ) 2 s^2=\frac{1}{N}\underset{n}{\sum }(x^n-m)^2 s2=N1n∑(xn−m)2
- E [ s 2 ] = N − 1 N σ 2 ≠ σ 2 E[s^2]=\frac{N-1}{N}\sigma ^2\neq \sigma ^2 E[s2]=NN−1σ2=σ2,N越大,估计量 s 2 s^2 s2with the true variance σ 2 \sigma ^2 σ2the smaller the difference.
1.1 方差(Variance)
- 越简单的模型,方差越小;越复杂的模型,方差越大
- Simple models are less affected by the data
1.3 偏置值(Bias)
- 越简单的模型,The larger the offset value is;越复杂的模型,The smaller the offset value
- 对于简单的模型,Because it contains a relatively small set of functions,May not contain the real function at all,So no matter how you look for it,No real model could be found either.That's why the simpler model,The reason for its larger bias value.
1.4 模型优化方向
- When the variance of the model(Variance)比较大时,The model will overfit(Overfitting).
- If the model fits well on the training set,And the performance on the test set is very poor,Then the variance is large,过拟合
- 增大数据集:For example, take more sample data,Or perform data enhancement on the original data,This does not change the bias value of the model(推荐)
- Handwritten digit recognition:Angular flip the data in the training set
- 影像辨识:Angular flip the data in the training set
- 语音辨识:If only boys data,There are no data for girls,You can use a voice changer to convert boys' data into girls' data.If the data is not disturbed by noise,In the real scene, there is noise interference.Then the noise of the scene can be recorded and synthesized with the training set,Then the data in the real scene is obtained.
- 语音翻译:When there is only data in one national language in hand,却想做10language translation tasks,Then, data in multiple languages can be obtained in the form of machine translation
- 正则化(Regularization):Add a term after the loss functionterm,to reduce the sensitivity of the model to the input,Doing so will reduce the model space,It will also increase the bias value of the model.(不推荐)
- When the bias value of the model(Bias)比较大时,The model does not fit(Underfitting).
- If the model fits poorly on the training set,Then the bias value is larger,does not fit
- At this point it is time to redesign our model,For example, increasing the complexity of the model:考虑更多的特征,Consider multiple powers for a single feature
二、交叉验证(Cross Validation)
- 交叉验证
- Divide the original training set into two,Divided into real training set and validation set.That is, don't optimize your model by exposing the results on the test set,Instead, just optimize your model by the results on the validation set,This way the model does not overfit,It also better reflects the real situation of your model.
- N次交叉验证(N-fold Cross Validation)
- Divide the original training set into three,One piece of data is taken each time as a validation set,The other two are used as training set.Calculations for different models are given below3The average loss value in each case,Publish the best performing model to the public test set.
边栏推荐
猜你喜欢
随机推荐
【sdx62】XBL设置共享内存变量,然后内核层获取变量实现
分布式锁-Redission - 缓存一致性解决
从何跟踪伦敦金最新行情走势?
1096 big beautiful numbers (15 points)
Service的两种状态形式
1.1-回归
tf.cast(),reduce_min(),reduce_max()
prometheus学习5altermanager
计算YUV文件的PSNR与SSIM
囍楽云任务源码
There may be fields that cannot be serialized in the abnormal object of cdc and sqlserver. Is there anyone who can understand it? Help me to answer
2.1 - Gradient Descent
1096 大美数 (15 分)
My creative anniversary丨Thank you for being with you for these 365 days, not forgetting the original intention, and each is wonderful
3GPP LTE/NR信道模型
从苹果、SpaceX等高科技企业的产品发布会看企业产品战略和敏捷开发的关系
Pico neo3在Unity中的交互操作
How Unity handles C# under the hood
LeetCode brushing series -- 46. Full arrangement
[Recommender System]: Overview of Collaborative Filtering and Content-Based Filtering