Skip to content
PetalEdgeDocs

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:

PartUsed forSeen during training?
Training setThe model learns from itYes
Validation setChecks progress after every training cycleOnly to measure, never to learn
Testing setThe final, honest examNo

How PetalEdge splits your data

  1. 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.
  2. 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