> For the complete documentation index, see [llms.txt](https://baozoulin.gitbook.io/neural-networks-and-deep-learning/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://baozoulin.gitbook.io/neural-networks-and-deep-learning/di-san-men-ke-jie-gou-hua-ji-qi-xue-xi-xiang-mu-structuring-machine-learning-projects/di-san-men-ke-structuring-machine-learning-projects/di-yi-zhou-ml-strategy/16-kai-fa-ji-he-ce-shi-ji-de-da-xiao-ff08-size-of-dev-and-test-sets.md).

# 1.6 开发集和测试集的大小（Size of dev and test sets）

* 样本数量不多（小于一万）的时候，通常将Train/dev/test sets的比例设为60%/20%/20%
* 没有dev sets的情况下，Train/test sets的比例设为70%/30%
* 样本数量很大（百万级别）的时候，通常将相应的比例设为98%/1%/1%或者99%/1%

dev sets数量的设置，遵循的准则是通过dev sets能够检测不同算法或模型的区别，以便选择出更好的模型

test sets数量的设置，遵循的准则是通过test sets能够反映出模型在实际中的表现

实际应用中，可能只有train/dev sets，而没有test sets。这种情况也是允许的，只要算法模型没有对dev sets过拟合。但条件允许的话，最好有test sets，实现无偏估计

![](/files/-Le0cr6_hBDYm-vQQ3jE)![](/files/-Le0cr6bQ2mxk2JELH3m)
