机器学习中的训练集、验证集和测试集

 在机器学习中咱们把数据分为测试数据训练数据web

测试数据就是测试集,是用来测试已经训练好的模型的泛化能力。 机器学习

训练数据常被划分为训练集(training set)验证集(validation set),好比在K-折交叉验证中,整个训练数据集D,就被分为K个部分,每次挑选其中的(K-1)部分作训练集,剩下的部分为验证集。 svg

训练集是用来训练模型或肯定模型参数的,如ANN中权值,CNN中的权值等;验证集是用来作模型结构选择,肯定模型中的一些超参数,好比正则项系数,CNN各个隐层神经元的个数等;学习

 如下是维基百科中的解释:测试

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

  • 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. xml

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