Skip to main content
. Author manuscript; available in PMC: 2013 May 1.
Published in final edited form as: Artif Intell Med. 2012 Mar 3;55(1):61–70. doi: 10.1016/j.artmed.2012.01.002

Algorithm 1.

Leave-One-Out Cross-Validation(D)

Require: D = {(x1, y1), … (xN, yN)}
  1: for i = 1 to N do
  2:    DiD{(xi, yi)}.
  3:    Mi ← BuildModel(Di)
  4:    errori ← |Mi(xi) − yi|
  5: end for
  6: return accuracy=11Ni=1Nerrori