| Algorithm 2 Fold generation of DOB-SCV (based on Ref. [20]) | |||
| Require: k // number of folds | |||
| Require: // classes | |||
| Ensure: // generated folds | |||
| for to n do | |||
| while do | |||
| randomly select sample from | |||
| \ | |||
| for to k do | |||
| select the nearest neighbour of from | |||
| \ | |||
| if then | |||
| // end for j | |||
| end if | |||
| end for | |||
| end while | |||
| end for | |||