Cross-validation over images
This section explains cross-validation over images (as selected in the Samples tab of the Cross-validation panel).
In the Selection tab, we have three choices for common cross-validation strategies:
- Leave-one out - in this setup a single item defined in Samples (an image in this section) is left for testing and all others used for trainig.
- Rotation - Here a random splitting of images is performed first, followed by definition of smaller image groups called folds. In each fold, one group is used for testing and all remaining for training. Note, that images in each fold are tested only once in the rotation scheme
- Randomization - In this setup a random subset of a user-defined percentage is used for testing and all remaining samples for training. This process is repeated fold-times. The major difference from Rotation is that items in the test (images) may be used for testing multiple times.
To start the cross-validation session, we click on Start session button .
The first fold of a leave-one-image-out scheme will look like as follows:
We may now perform what ever model building action we like with standard perClass Mira tools. For example, run a model search in the Regression tool. We will observe a single test object:
To move to another leave-one-out fold, we may use either the fold spinbox or the slider. We are free to jump to any fold we like. For example, jumping to the 3rd fold and re-running model search, we will observe the following:
This is to explain the concept of cross-validation. Of course, leaving out a single single image is not too complex in a normal work-flow and thus not very exciting. However, the Rotation and Randomization schemes performed using the cross-validation over images become a great help. Whe the Cross-validation tool really shines is the cross-valiadtion considering replicas.
TIP: After each manual retraining, you may copy the test set performance out from the Statistics tab
Closing cross-validation session
The cross-validation session needs to be ended by pressing End session button above. Alternatively, cancelling image selection also disables the session. When selecting multiple images again, we must explicitly start the cross-validation session.