Data and training
Training, validation and testing
Why your data is split into three parts, and how PetalEdge does it for you.
On this page
The idea in one minute
If you mark your own homework, you will always pass. A model is the same: it must be checked on data it has never seen. So the data is split:
| Part | Used for | Seen during training? |
|---|---|---|
| Training set | The model learns from it | Yes |
| Validation set | Checks progress after every training cycle | Only to measure, never to learn |
| Testing set | The final, honest exam | No |
How PetalEdge splits your data
- Training vs testing. When you upload with the category set to automatic, PetalEdge puts about 80 % of the files in the training set and 20 % in the testing set. The choice is based on the file name, so the same file always goes to the same set. You can move samples between sets yourself.
- Validation. When you train, PetalEdge keeps part of the training set aside for validation. The Validation split setting controls how much; the default is 0.2 (20 %).
A simple example
You have 100 motion recordings.
- About 80 go to training and 20 to testing (automatic category).
- With a validation split of 0.2, about 16 of the 80 training recordings are used for validation, and the model learns from the other 64.
- After training, Model testing runs the model on the 20 testing recordings. That score is the one to trust.
Leakage: the hidden mistake
Leakage means the test data sneaks into training, so the score looks great but the model fails in real life. Common causes:
- The same recording uploaded twice under different names, so one copy lands in each set.
- Very similar photos (taken a second apart) split between training and testing.
Keep different sessions or different people in different sets when you can.
Where you use this in PetalEdge
- Moving samples between sets: Labeling images, Labeling and splitting recordings, Audio labels and splits.
- The Validation split setting: Training a Motion model.
- The final exam: Evaluating a Motion model.