Leave-one-out cross validation systematically leaves out one row from the data, retrains the
classifier and then uses the retrained classifier to make a prediction for the left-out row.
Usage
loocv(data, train.fun, eval.fun, verbose=FALSE)
Arguments
data
The data.frame with data. Columns are variables, rows are observations.
train.fun
The training function that takes the data without one of the rows left out.
eval.fun
The prediction function that takes the trained model and the left out data point.
verbose
If to print progress indication
Value
nrow(data) containing predictions from eval.fun when each
row is left out once