训练集,验证集和测试集

来源:互联网 发布:windows hosts文件位置 编辑:程序博客网 时间:2024/05/01 01:05

Training set: A set of examples used for learning, which is to fit the parameters [i.e., weights] of the classifier. 

Validation set: A set of examples used to tune the parameters [i.e., architecture, not weights] of a classifier, for example to choose the number of hidden units in a neural network. 

Test set: A set of examples used only to assess the performance [generalization] of a fully specified classifier. 

训练集:学习样本数据集,通过匹配一些参数来建立一个分类器。建立一种分类的方式,主要是用来训练模型的。

验证集:对学习出来的模型,调整分类器的参数,如在神经网络中选择隐藏单元数。验证集还用来确定网络结构或者控制模型复杂程度的参数。

测试集:主要是测试训练好的模型的分辨能力(识别率等)

显然,training set是用来训练模型或确定模型参数的; validation set是用来做模型选择(model selection),即做模型的最终优化及确定的;而 test set则纯粹是为了测试已经训练好的模型的推广能力。当然,test set这并不能保证模型的正确性,他只是说相似的数据用此模型会得出相似的结果。但实际应用中,一般只将数据集分成两类,即training set 和test set,大多数文章并不涉及validation set。 


针对数据偏差与数据方差的关系

偏差:描述的是预测值(估计值)的期望与真实值之间的差距。偏差越大,越偏离真实数据,如下图第二行所示。

方差:描述的是预测值的变化范围,离散程度,也就是离其期望值的距离。方差越大,数据的分布越分散,如下图右列所示。



原创粉丝点击