create.test.index: Create resampling index for test data

View source: R/misc.R

create.test.indexR Documentation

Create resampling index for test data

Description

This function provides resamples for test data to be used in evaluate or ROCcurve Arguments are similar to trainControl.

Usage

create.test.index(
  testy,
  control = NULL,
  method = "boot",
  number = ifelse(grepl("cv", method), 10, 25),
  repeats = 10,
  p = 0.75
)

Arguments

testy

A factor of response variable of the test data.

control

A trainControl object or a train model from which a trainControl object is used.

method, number, repeats, p

Check trainControlfor details. Only used if control = NULL.

Details

When control is provided, arguments "method", "number", "repeats" and "p" are obtained from the trainControl object and used to create the index for test data. When control = NULL, the arguments provided in this function are used instead.

Value

A list of test data index to be used in each resampling.

See Also

create.test.index.blockCV


correapvf/caretSDM documentation built on June 2, 2022, 8:29 a.m.