Learn R Programming

mt (version 2.0-1.20)

valipars: Generate Control Parameters for Resampling

Description

Generate the control parameters for resampling process.

Usage

valipars(sampling="cv", niter=10, nreps=10, strat=FALSE,div = 2/3)

Value

An object of class valipars containing all the above parameters (either the defaults or the user specified values).

Arguments

sampling

Sampling scheme. Valid options are:

  • loocv. Leave-one-out cross-validation

  • cv. Cross-validation (default)

  • rand. Randomised validation (holdout)

  • boot. Bootstrap

niter

Number of iteration or repeat for validation.

nreps

Number of replications in each iteration.

strat

A logical value indicating whether the stratification should be applied to cv, rand and boot.

div

Proportion of data used for training in randomised validation method.

Author

Wanchang Lin

Details

valipars provides a list of control parameters for the resampling or validation in the process of accuracy evaluation or feature selection process.

See Also

trainind

Examples

Run this code
## generate control parameters for the re-sampling scheme with 5-fold 
## cross-validation and iteration of 10 times
valipars(sampling = "cv", niter = 10, nreps = 5)

## generate control parameters for the re-sampling scheme with 
## 25-replication bootstrap and iteration of 100 times
valipars(sampling = "boot", niter = 100, nreps = 25,strat=TRUE)

## generate control parameters for the re-sampling scheme with 
## leave-one-out cross-validation
valipars(sampling = "loocv")

Run the code above in your browser using DataLab