crossvalidation {kyotil} | R Documentation |
Cross Validation Functions
Description
Cross validation utility functions.
Usage
sample.for.cv (dat, v, seed)
get.kfold.splits (dat, k, seed)
kfold.split (k, n1, n0)
ran.kfold.split(k, n1, n0, replicates)
lpo.split(n1, n0)
get.splits (dat, cv.scheme=c("LPO","5fold","50xrandom4:1"), seed)
Arguments
dat |
a data frame. One of the columns must be named y and y should be 0/1 with 1 for case and 0 for control |
v |
v-fold cross validation |
seed |
seed for random number generators |
k |
var.equal |
n1 |
var.equal |
n0 |
var.equal |
replicates |
var.equal |
cv.scheme |
var.equal |
Details
sample.for.cv: case and controls are sampled separately.
Value
sample.for.cv returns a list of two vector of integers: train and test, which refer to the rows of dat
[Package kyotil version 2024.5-8 Index]