loocv: Leave-one-out cross validation

Description Usage Arguments Value

View source: R/svm.R

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


ddgraph documentation built on Nov. 17, 2017, 10:50 a.m.