Leave-one-out cross validation

Share:

Description

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

1
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

A vector of length nrow(data) containing predictions from eval.fun when each row is left out once

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.