CV | R Documentation |

Performs the usual k-fold cross-validation procedure on a given data set, parameter grid and learner.

CV(data, learner, params, fold = 5, verbose = TRUE)

`data` |
The data set as |

`learner` |
The learner as |

`params` |
the parameter grid as |

`fold` |
The number of folds that should be generated for each set of parameters. |

`verbose` |
Should the procedure report the performance for each model? |

Returns the optimal parameter settings as determined by k-fold cross-validation.

Tammo Krueger <tammokrueger@googlemail.com>

M. Stone.
Cross-validatory choice and assessment of statistical predictions.
*Journal of the Royal Statistical Society. Series B*, 36(2):111–147, 1974.

Sylvain Arlot, Alain Celisse, and Paul Painleve.
A survey of cross-validation procedures for model selection.
*Statistics Surveys*, 4:40–79, 2010.

`fastCV`

`constructData`

`constructLearner`

`constructParams`

ns = noisySine(100) svm = constructSVMLearner() params = constructParams(kernel="rbfdot", sigma=10^(-3:3), nu=c(0.05, 0.1, 0.2, 0.3)) opt = CV(ns, svm, params)

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.