crossValRepWithGs3: Replicated K-fold cross-validation

Description Usage Arguments Value Author(s) See Also

Description

Perform replicated K-fold cross-validation with GS3, i.e. call crossValWithGs3 several times, with different seeds.

Usage

1
2
3
4
crossValRepWithGs3(genos, dat, config, task.id = "GS3",
  binary.trait = FALSE, ped.file = "", afs = NULL, nb.reps = 50,
  seed = NULL, nb.cores.rep = 1, nb.folds = 10, remove.files = "some",
  nb.cores.fold = 1, cl = NULL, verbose = 1)

Arguments

genos

matrix of SNP genotypes

dat

data frame with phenotypes

config

list containing the configuration for GS3

task.id

character containing the task identifier used as prefix for the output files (for each fold, its index will be added)

binary.trait

logical

ped.file

path to the file containing the pedigree (if not used, use NA or "" instead of NULL)

afs

vector of allele frequencies which names are SNP identifiers (column names of genos); if NULL, will be estimated from genos; used to compute the variance of additive genotypic values from the variance of additive SNP effects (see Vitezica et al, 2013), then used to compute narrow-sense heritability

nb.reps

number of replicates (a set of folds will be sampled for each replicate)

seed

if not NULL, this seed for the pseudo-random number generator will be used to sample as many seeds as the number of replicates, these new seeds being used to shuffle genotypes before partitioning per fold

nb.cores.rep

number of cores to launch replicates in parallel (via mclapply, on Unix-like computers)

nb.folds

number of folds

remove.files

remove files per fold (none/some/all); use "some" in real-life applications in order to keep estimates of SNP effects per fold, thereby allowing to perform genomic prediction afterwards by averaging them

nb.cores.fold

number of cores to launch folds in parallel (via mclapply, on Unix-like computers, or parLapply on Windows); you can also use detectCores; will be set to 1 if nb.cores.rep is bigger than 1

cl

object returned by makeCluster, necessary only if nb.cores.fold > 1 and the computer runs Windows; if NULL in such cases, will be created silently

verbose

verbosity level (0/1/2); there will be a progress bar only for verbose=1

Value

data frame

Author(s)

Timothee Flutre

See Also

crossValWithGs3


INRA/rgs3 documentation built on May 20, 2019, 5:24 p.m.