【Machine Learning】笔记:Train/Validation/Test Sets
来源:互联网 发布:淘宝店铺怎么发布微淘 编辑:程序博客网 时间:2024/06/06 06:51
课程来自 Coursera 上 Andrew Ng 的 machine learning 第6周的内容。
怎样选择模型?比如多项式回归,怎样选择多项式的次数?
比如分别有 1-10 次的 10 个多项式,可以将数据集划分为 Train/Test 两部分,老师推荐的比例为 7:3,对数据在 Train 上进行拟合,之后检验 Test 上的误差,看几次多项式的 Test 误差最小,就选几次。
Tips:在划分数据集时,如果数据是有规律或是排好序的,需要打乱。
但是,能否用最终得到的 Test 上的误差来估计该算法的泛化误差?
这是不行的,如果这样做了,会导致估计的误差偏小,因为 Test 集是被用来选择“几次方”这个参数的,对该参数而言,在 Test 集上已经被优化过了,即相当于是个训练“几次方”参数的训练集。
因此,更好的做法是把数据分为 Train/Validation/Test 三部分,老师推荐的比例为 6:2:2,Train 集用来训练多项式系数,Validation 集用来选择几次多项式,Test 集用来估计泛化误差(generalization error)。
阅读全文
0 0
- 【Machine Learning】笔记:Train/Validation/Test Sets
- three sets in machine learning
- Cross Validation in machine learning
- 【data mining】train, validation, test的区别
- train set,validation set and test set
- 5. Your development and test sets 你的开发集和测试集(《MACHINE LEARNING YEARNING》翻译)
- 12. Takeaways: Setting up development and test sets 小结:建立开发集和测试集(《MACHINE LEARNING YEARNING》翻译)
- CalTech machine learning, video 13 note(validation)
- 【Machine Learning】笔记:Online Learning
- 【Machine Learning】笔记:Transfer Learning
- stanford machine learning 笔记
- Machine Learning 学习笔记
- Machine Learning 笔记
- Machine Learning笔记
- machine learning 学习笔记
- 【Machine Learning】笔记:SVM
- Foundation of Machine Learning 笔记第二部分——Guarantees for Finite Hypothesis Sets in Consistent Case
- Foundation of Machine Learning 笔记第三部分——Guarantees for Finite Hypothesis Sets in Inconsistent Case
- NDK的基础教程 二 c语言回调java语言
- dedecms栏目路由命名规则
- 大数据学习笔记:启动脚本分析,start-dfs.cmd与start-yarn.cmd
- 设计模式(21)--策略模式
- Android与H5交互
- 【Machine Learning】笔记:Train/Validation/Test Sets
- js实现页面显示时间
- 汉诺塔(三)
- 贝叶斯实现文本分类C++实现
- Linux_FTP
- leetcode String to Integer (atoi)
- 网卡DM9000驱动
- #Java泛型类。
- easyUI的一些通用