View source: R/CrossValidation.R
CrossVD | R Documentation |
This function calculates the estimated K-fold or Leave-one-out cross-validation mean squared prediction error.
CrossVD(data, K = NULL, get_mean = T, verb = F, OPT, ...)
data |
list containing the data, elements must be named |
K |
integer the number of folds. Set equal to |
get_mean |
boolean if |
verb |
bool if |
OPT |
function the optimization function whose prediction power has to be tested. If can only be equal to
|
... |
optional arguments to OPT |
if get_mean
is TRUE
, the CV-MSE is returned.
Otherwise the function returns a vector containing all MSE computed for each fold.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.