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 training.
  • Rotation: 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 groups 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-out scheme will look like this:



We may now perform whatever 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, the slider, or go to the next fold using the Next fold button. 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 image is not too complex in a normal workflow and thus not very exciting. However, the Rotation and Randomization schemes in the Cross-validation tool can become a great help. Where the Cross-validation tool really shines is cross-validation considering replicas.


TIP: After each manual retraining, you may copy the test set performance from the Statistics tab.

Closing cross-validation session

The cross-validation session needs to be ended by pressing the End session button above.