当前位置:网站首页>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 .
边栏推荐
- 6. Dropout application
- From starfish OS' continued deflationary consumption of SFO, the value of SFO in the long run
- Tapdata 的 2.0 版 ,开源的 Live Data Platform 现已发布
- NTT template for Tourism
- Cve-2022-28346: Django SQL injection vulnerability
- Letcode43: string multiplication
- 9. Introduction to convolutional neural network
- Kubernetes Static Pod (静态Pod)
- 基于卷积神经网络的恶意软件检测方法
- 5.过拟合,dropout,正则化
猜你喜欢
随机推荐
C#中string用法
[OBS] the official configuration is use_ GPU_ Priority effect is true
12.RNN应用于手写数字识别
AI zhetianchuan ml novice decision tree
Jemter distributed
Cross modal semantic association alignment retrieval - image text matching
5g NR system messages
Binder core API
Fundamentals - integrating third-party technology
8.优化器
国内首次,3位清华姚班本科生斩获STOC最佳学生论文奖
Lecture 1: the entry node of the link in the linked list
Basic types of 100 questions for basic grammar of Niuke
取消select的默认样式的向下箭头和设置select默认字样
网络模型的保存与读取
FOFA-攻防挑战记录
语义分割模型库segmentation_models_pytorch的详细使用介绍
What is load balancing? How does DNS achieve load balancing?
The weight of the product page of the second level classification is low. What if it is not included?
[go record] start go language from scratch -- make an oscilloscope with go language (I) go language foundation