Skip to main content
. 2023 Feb 20;23(4):2333. doi: 10.3390/s23042333
Algorithm 1 Fold generation of SCV (based on Ref. [20])
Require: k            // number of folds
Require: C={C1,C2,,Cn}   // classes
Ensure: F1,F2,,Fk                         // generated folds
F1,F2,,Fk
for i:=1 to n do
      ncount(Ci)/k
      if i(count(Ci) mod k) then
            nn+1
      end if
      for j:=1 to k do
            S randomly select n samples from Ci
            FjFjS
            CiCi \S
      end for
end for