何时使用训练验证测试集 [英] When to use Train Validation Test sets

查看:47
本文介绍了何时使用训练验证测试集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这个问题很常见,但我已经查看了之前提出的所有问题,但我仍然无法理解为什么我们还需要验证集.我知道有时人们只使用训练集和测试集,那么为什么我们还需要验证集?我们如何使用它?例如,为了估算缺失数据,我是否分别估算了这 3 个不同的集合?

I know this question is quite common but I have looked at all the questions that have been asked before and I still can't understand why we also need a validation set. I know sometimes people only use a train set and a test set, so why do we also need a validation set? And how do we use it? For example, in order to impute missing data, I impute these 3 different sets separately or not?

谢谢!

推荐答案

我会试着用一个例子来回答.

I will try to answer with an example.

如果我正在训练神经网络或进行线性回归,并且我只使用训练和测试数据,我可以检查每次迭代的测试数据丢失情况,并在测试数据丢失开始增长或获取快照时停止测试损失最低的模型.

If I'm training a neural network or doing linear regression, and I'm using only train and test data I can check my test data loss for each iteration and stop when my test data loss begins to grow or get a snapshot of the model with the lowest test loss.

从某种意义上说,这对我的测试数据来说是过拟合"的,因为我根据它决定何时停止.

Is some sense this is "overfiting" to my test data since i decide when to stop based on that.

如果我使用测试、训练和验证数据,我可以使用验证而不是测试数据执行与上述相同的过程,然后在我决定模型何时完成训练后,我可以在前所未有的情况下对其进行测试看到了测试数据,以便为我的模型预测提供更公正的分数.

If I was using test, train and validation data I can do the same process as above with the validation instead of the test data, and then after i decide when my model is done training, I can test it on the never before seen test data to give me a more unbiased score of my models predictions.

对于问题的第二部分,我建议至少将测试数据视为独立的,并对缺失数据进行不同的估算,但这取决于情况和数据.

For the second part of the question, I would suggest to treat at least the test data as independent and impute the missing data differently, but it depends on the situation and data.

这篇关于何时使用训练验证测试集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆