# Train/Test split ratio

**URL:** <https://community.drivendata.org/t/train-test-split-ratio/57>\
**Category:** Warm Up: Predict Blood Donations\
**Created:** [January 22, 2015, 1:22am UTC](https://community.drivendata.org/t/train-test-split-ratio/57 "2015-01-22T01:22:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![BKR](https://avatars.discourse-cdn.com/v4/letter/b/898d66/32.png) [@BKR](https://community.drivendata.org/u/BKR)\
**Post date:** [January 22, 2015, 1:22am UTC](https://community.drivendata.org/t/train-test-split-ratio/57/1 "2015-01-22T01:22:26Z")

</div>

Hi,

With such a (relative) small dataset, what ratio do you use for training/testing? Also what is the recommended validation method Bootstrapping or K-Fold in this particular scenario?

I would love to hear your thoughts.

Cheers  
BKR

---

<div class="post-metadata">

**Author:** ![jhpincus](https://yyz2.discourse-cdn.com/flex028/user_avatar/community.drivendata.org/jhpincus/32/412_2.png) [@jhpincus](https://community.drivendata.org/u/jhpincus)\
**Post date:** [June 9, 2016, 6:28pm UTC](https://community.drivendata.org/t/train-test-split-ratio/57/2 "2016-06-09T18:28:35Z")

</div>

There are no hard and fast rules for sample splitting. A 70/30 (training/test) split worked for me. I use the sample.split function in R’s caTools package.

---

<div class="post-metadata">

**Author:** ![zenzizenzi](https://avatars.discourse-cdn.com/v4/letter/z/2acd7d/32.png) [@zenzizenzi](https://community.drivendata.org/u/zenzizenzi)\
**Post date:** [September 20, 2016, 4:17am UTC](https://community.drivendata.org/t/train-test-split-ratio/57/3 "2016-09-20T04:17:22Z")

</div>

Are you talking about splitting the dataset where prediction variable is known, further into training/test datasets? I believe that helps you test the algorithms you have created.

---

<div class="post-metadata">

**Author:** ![neonqwerty](https://yyz2.discourse-cdn.com/flex028/user_avatar/community.drivendata.org/neonqwerty/32/442_2.png) [@neonqwerty](https://community.drivendata.org/u/neonqwerty)\
**Post date:** [October 4, 2016, 5:43am UTC](https://community.drivendata.org/t/train-test-split-ratio/57/4 "2016-10-04T05:43:50Z")

</div>

The fact that the dataset is so small is kind of annoying. From what I’ve read, the 70.30 split that jhpincus mentioned seems standard. That said, I was frustrated to see that that the model that performed the best when tested with the 70/30 strategy ended up being in the middle of the pack when I decided to just go ahead and upload all the sane models I tried out.

I’d love to hear more thoughts by experienced users on how to handle small datasets.
