当前位置:网站首页>5. Over fitting, dropout, regularization
5. Over fitting, dropout, regularization
2022-07-08 01:02:00 【booze-J】
article
Over fitting
Over fitting leads to larger test error :
You can see that as the model structure becomes more and more complex , The error of training set is getting smaller and smaller , The error of the test set decreases first and then increases , Over fitting leads to larger test error .
The better case is that the two lines of training error and test error are relatively close .
Prevent over fitting
1. Increase the data set
There is a popular saying in the field of data mining ,“ Sometimes having more data is better than a good model ”. Generally speaking, more data participate in training , The better the training model . If there is too little data , And if the neural network we build is too complex, it is easier to produce the phenomenon of over fitting .
2.Early stopping
In training the model , We often set a relatively large number of generations .Early stopping It is a strategy to end training in advance to prevent over fitting .
The general practice is to record the best so far validation accuracy, As the continuous 10 individual Epoch Not reaching the best accuracy when , You could say accuracy It's not improving anymore . At this point you can stop iterating (Early Stopping).
3.Dropout
Every time I train , Will turn off some neurons randomly , Closing does not mean removing , Instead, these dotted neurons do not participate in training . Pay attention to the general training , When testing the model , Is to use all neurons , It's not going to happen dropout.
4. Regularization
C0 Represents the original cost function ,n Represents the number of samples , λ \lambda λ That's the coefficient of the regular term , Weigh regular terms against C0 Proportion of items .
L1 Regularization :
L1 Regularization can achieve the effect of sparseness of model parameters .
L2 Regularization :
L2 Regularization can attenuate the weight of the model , Make the model parameter values close to 0.
When λ \lambda λ=0.001 when , Over fitting phenomenon appears , When λ \lambda λ=0.01 when , There is a slight over fitting , When λ \lambda λ=0.1 There was no fitting phenomenon when .
边栏推荐
- 【愚公系列】2022年7月 Go教学课程 006-自动推导类型和输入输出
- 130. Zones environnantes
- Deep dive kotlin collaboration (the end of 23): sharedflow and stateflow
- 13. Enregistrement et chargement des modèles
- Cancel the down arrow of the default style of select and set the default word of select
- 9.卷积神经网络介绍
- Letcode43: string multiplication
- 新库上线 | CnOpenData中华老字号企业名录
- 大二级分类产品页权重低,不收录怎么办?
- Is it safe to speculate in stocks on mobile phones?
猜你喜欢
随机推荐
Mathematical modeling -- knowledge map
13.模型的保存和載入
Stock account opening is free of charge. Is it safe to open an account on your mobile phone
1293_ Implementation analysis of xtask resumeall() interface in FreeRTOS
基础篇——整合第三方技术
FOFA-攻防挑战记录
Fundamentals - integrating third-party technology
From starfish OS' continued deflationary consumption of SFO, the value of SFO in the long run
The weight of the product page of the second level classification is low. What if it is not included?
语义分割模型库segmentation_models_pytorch的详细使用介绍
牛客基础语法必刷100题之基本类型
NTT template for Tourism
133. Clone map
Deep dive kotlin collaboration (the end of 23): sharedflow and stateflow
Handwriting a simulated reentrantlock
国内首次,3位清华姚班本科生斩获STOC最佳学生论文奖
Jemter distributed
网络模型的保存与读取
Service Mesh介绍,Istio概述
Binder core API