cv_na | R Documentation |
This type of cross validation consists of a single fold where all the NA values are taken to be the testing set and the remaining ones to be the training set. Useful in genomic selection when we want to predict the phenotypes of the individuals with missing phenotypes.
cv_na(x)
x |
( |
A list
with a single element which is a named list
with the elements
training
wich includes the indices of those records to be part of the
training set and testing
wich includes the indices of those records to be
part of the testing set.
## Not run:
# Generates random data with NAs
x <- c(1, 2, 3, NA, 5, 6, 7, NA, 9, 10)
folds <- cv_na(x)
# Indices of training set in fold 1
folds[[1]]$training
# Indices of testing set in fold 1
folds[[1]]$testing
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.