BootCP {CPEg} | R Documentation |
Bootstrapping is used to estimate the mis-classification rate of a classification algorithm.
BootCP(X, y, Xt, yt, fun = FitLDA, NREP = 10, nTrain = nrow(X))
X |
original training data inputs |
y |
original training data output |
Xt |
original test data inputs |
yt |
original test data output |
fun |
the classification function |
NREP |
number of bootstrap replications |
nTrain |
size of training sample, default is same as inputs |
The training and test data are combined.
matrix giving the average mis-classfication rates in the training and test samples and the corresponding standard deviations
AIM
data(Mixture) attach(Mixture) BootCP(X,y,Xt,yt, NREP=15, fun=function(a,b,c,d) FitkNN(a,b,c,d,k=7) )