Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

kfoldcv

Subsamples for k-fold Cross-Validation


Description

Computes feasible sample sizes for the k groups in k-fold cv if N/k is not an integer.

Usage

kfoldcv(k, N, nlevel=NULL)

Arguments

k

number of groups.

N

total sample size.

nlevel

a vector of sample sizes for stratified sampling.

Details

If N/k is not an integer, k-fold cv is not unique. Determine meaningful sample sizes.

Value

A vector of length k.

Examples

# 10-fold CV with N = 91

kfoldcv(10, 91)

ipred

Improved Predictors

v0.9-11
GPL (>= 2)
Authors
Andrea Peters [aut], Torsten Hothorn [aut, cre], Brian D. Ripley [ctb], Terry Therneau [ctb], Beth Atkinson [ctb]
Initial release
2021-03-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.