当前位置:网站首页>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 .
边栏推荐
- Class head up rate detection based on face recognition
- My best game based on wechat applet development
- Invalid V-for traversal element style
- Cve-2022-28346: Django SQL injection vulnerability
- Reentrantlock fair lock source code Chapter 0
- CVE-2022-28346:Django SQL注入漏洞
- Hotel
- 【obs】Impossible to find entrance point CreateDirect3D11DeviceFromDXGIDevice
- Su embedded training - Day6
- Basic mode of service mesh
猜你喜欢

9. Introduction to convolutional neural network

10.CNN应用于手写数字识别

FOFA-攻防挑战记录

6.Dropout应用

Malware detection method based on convolutional neural network

Lecture 1: the entry node of the link in the linked list

Interface test advanced interface script use - apipost (pre / post execution script)

Service Mesh介绍,Istio概述

Su embedded training - Day6

完整的模型验证(测试,demo)套路
随机推荐
14. Draw network model structure
NVIDIA Jetson test installation yolox process record
letcode43:字符串相乘
The weight of the product page of the second level classification is low. What if it is not included?
【obs】Impossible to find entrance point CreateDirect3D11DeviceFromDXGIDevice
Which securities company has a low, safe and reliable account opening commission
Reentrantlock fair lock source code Chapter 0
Cve-2022-28346: Django SQL injection vulnerability
Codeforces Round #804 (Div. 2)
牛客基础语法必刷100题之基本类型
Fofa attack and defense challenge record
Serial port receives a packet of data
Su embedded training - Day7
[Yugong series] go teaching course 006 in July 2022 - automatic derivation of types and input and output
Service Mesh的基本模式
[go record] start go language from scratch -- make an oscilloscope with go language (I) go language foundation
130. Zones environnantes
Su embedded training - Day8
13. Enregistrement et chargement des modèles
Class head up rate detection based on face recognition