当前位置:网站首页>How to prevent overfitting in cross validation
How to prevent overfitting in cross validation
2022-07-07 01:21:00 【ZEERO~】
1、 Definition of over fitting and under fitting
Over fitting It means that the model performs well in the training set , Poor performance in validation set and test set ;
Under fitting It refers to the model in the training set 、 Test set 、 The performance on the verification set is very poor .
2、 Analysis of the causes of over fitting and under fitting
2.1 Number of samples
We know , The number of samples for machine learning algorithm , Suppose the model is suitable for big data sets , The more samples, the better . When the number of samples is insufficient , Under fitting will occur , The performance of the model on the three data sets is very poor .
2.2 Model complexity
Generally speaking , When we select the model , For example, logical regression , Linear regression , The more features are used , The higher the complexity of the model . We can use feature selection algorithm , for example MRMR、 Chi square test , Rank the importance of features . Then add features in turn , Calculate the accuracy and loss function of training set and test set . We usually find that , As the number of features increases , The accuracy of the training set will gradually tend to 100%, The accuracy of the test set will gradually decline . The loss of training set will gradually decrease to 0, The loss of test sets will gradually increase . For example, , When the training set loss is 0, The test set loss is not 0 when , We know that the model must have been fitted . such , We can roughly judge whether the current model has been fitted .
3、 Why cross validation can prevent over fitting
The first thing to note is , It's not that cross validation will reduce the complexity of the model or how to prevent the model from over fitting , Instead, the behavior of cross validation allows us to evaluate whether the model is over fitted during training .
We know ,5 Fold cross validation is random 80% Data for training ,20% To verify the data . In this case , If the model has been fitted ,
边栏推荐
- c语言—数组
- 界面控件DevExpress WinForms皮肤编辑器的这个补丁,你了解了吗?
- 前置机是什么意思?主要作用是什么?与堡垒机有什么区别?
- C language - array
- 黑马笔记---异常处理
- Installation of torch and torch vision in pytorch
- Install Firefox browser on raspberry pie /arm device
- Grc: personal information protection law, personal privacy, corporate risk compliance governance
- Informatics Orsay Ibn YBT 1172: find the factorial of n within 10000 | 1.6 14: find the factorial of n within 10000
- 斗地主游戏的案例开发
猜你喜欢

Windows installation mysql8 (5 minutes)

从底层结构开始学习FPGA----FIFO IP的定制与测试

The MySQL database in Alibaba cloud was attacked, and finally the data was found

Wood extraction in Halcon

【案例分享】网络环路检测基本功能配置

Maidong Internet won the bid of Beijing life insurance to boost customers' brand value

Do you understand this patch of the interface control devaxpress WinForms skin editor?
![[Niuke] b-complete square](/img/bd/0812b4fb1c4f6217ad5a0f3f3b8d5e.png)
[Niuke] b-complete square

Your cache folder contains root-owned files, due to a bug in npm ERR! previous versions of npm which

LLDP兼容CDP功能配置
随机推荐
阿里云中mysql数据库被攻击了,最终数据找回来了
Boot - Prometheus push gateway use
1123. 最深叶节点的最近公共祖先
动态规划思想《从入门到放弃》
mysql: error while loading shared libraries: libtinfo. so. 5: cannot open shared object file: No such
Cause of handler memory leak
UI控件Telerik UI for WinForms新主题——VS2022启发式主题
Oracle:CDB限制PDB资源实战
Receive user input, height BMI, BMI detection small business entry case
docker 方法安装mysql
第三方跳转网站 出现 405 Method Not Allowed
【信号与系统】
Openjudge noi 1.7 08: character substitution
Force buckle 1037 Effective boomerang
2022 Google CTF segfault Labyrinth WP
7.6模拟赛总结
Docker method to install MySQL
golang中的atomic,以及CAS操作
域分析工具BloodHound的使用说明
THREE.AxesHelper is not a constructor