cgcv: Estimate Misclassification Rate Using d-fold Cross-Validation...

Description Usage Arguments Value Author(s) Examples

Description

This is a general purpose function to estimate the misclassification rate for a specified classifier.

Usage

1
2
cgcv(X, y, yh = yh_NN, MaxIter = 1000, d = ceiling(length(y)/10), NCores = 1,
libs = character(0), seed = "default", ...)

Arguments

X

inputs

y

output factor

yh

function with arguments dfTrain and dfTest that produces the missclassification rate for test data

MaxIter

Number of iterations of the CV procedure

d

Number of observations for the hold-out sample

NCores

Default is 1 which does not use the parallel package. Otherwise, you can set to the number of cores available. If unsure, just experiment!

libs

Required libraries needed for the predictor.

seed

Default is to use R's default which is based on the current time. Otherwise set to an integer value. See Details.

...

Additional arguments that are passed to yh.

Value

cross-validated mis-classifcation rate

Author(s)

A. I. McLeod

Examples

1
2
3
4
Xy <- rmix(200) #training data
X <- as.matrix.data.frame(Xy[,1:2])
y <- Xy[,3]
cgcv(X, y, MaxIter=50)

gencve documentation built on May 2, 2019, 6:08 a.m.