Algorithm 2.
Require: D = {(x1, y1), … (xN, yN)} |
1: for i = 1 to N do |
2: for b = 1 to NFOLDS do |
3: Si ← Resample(D) |
4: errorb = 0 |
5: totalb = 0 |
6: if (xi, yi) ∉ Si then |
7: Mi,b ← BuildModel(Si) |
8: errori,b ← |Mi,b(xi) − yi| |
9: errorb ← errorb + errori,b |
10: totalb ← totalb + 1 |
11: errorb ← errorb/totalb |
12: end if |
13: end for |
14: end for |
15: |
16: M ← BuildModel(D) |
17: |
18: return accuracy ← 0.632 × accuracyb + 0.368 × accuracyt |