cv: Cross validation function

Description Usage Arguments Value

View source: R/cv.R

Description

Cross validation function

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
cv(
  x,
  y,
  nfolds = 10,
  folds = NULL,
  model_callback,
  predict_callback,
  fs_callback = NULL,
  opts = list(),
  ncores = 1
)

Arguments

x

a data.frame or matrix of predictors

y

response vector

nfolds

number of folds in cv, set k=nrow(df) to have loo

folds

list created with caret::createFolds function

model_callback

callback for modeling

predict_callback

callback for prediction

fs_callback

number of new (training) dataset sampled with replacement from 'training'

ncores

if ncores > 1 then it works in parallel

Value

list a (nested) list of ROCR prediction objects


creggian/bcpanel documentation built on Dec. 27, 2019, 3:44 p.m.