> For the complete documentation index, see [llms.txt](https://docs.unitlab.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.unitlab.ai/documentation/releases/release-splits-and-grouped-data.md).

# Release splits and grouped data

Split a release into train, validation and test sets without leaking related items across them.

A release can divide its items into **Train**, **Valid** and **Test** sets.

## Set the split

1. In the release dialog, find **Distribution**.
2. Drag the two handles to set the percentages. The dialog shows how many items each set gets.
3. Create the release, then check the actual counts in each set.

![Train, Valid and Test percentages with item counts and two handles](https://292810646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGjVLUz4wthGkGlRKM6rM%2Fuploads%2FVR7NeA35ogcKHZHJyZJL%2Frelease-distribution.webp?alt=media)

With few items, a small percentage can round down to zero items. Check the counts, not only the percentages.

## How items are split

* Items are split within each data type.
* A [Data Group](https://docs.unitlab.ai/documentation/data/data-groups-and-layouts.md), such as four camera views of one moment, always stays in one set.
* Unitlab doesn't know about other relations, such as the same patient or the same drive across different groups.

## Avoid leakage

If related items land in both Train and Test, your test score will look better than it really is. This is called **leakage**.

1. Decide what must stay together, for example one patient, one recording session, or one drive.
2. Put those items in one Data Group, or keep a list that maps each file to its group.
3. After the release, check a few groups: are all their files in the same set?

If they aren't, set the release to train 100 and split it yourself by group.

## Related

[Create a release](https://docs.unitlab.ai/documentation/releases/create-a-release.md) · [Data Groups and layouts](https://docs.unitlab.ai/documentation/data/data-groups-and-layouts.md) · [Inspect, download, and validate](https://docs.unitlab.ai/documentation/releases/inspect-download-and-validate.md)
