# NOT RUN {
data(DATA)
### perform batch-wise cross-validation using the function fnPcaLda
RES3 <- crossValidation(data=DATA$spec
,label=DATA$labels
,batch=DATA$batch
,method=fnPcaLda
,pred=predPcaLda
,folds=NULL
,nBatch=0
,nFold=3
,verbose=TRUE
,seed=NULL
### parameters to be passed to fnPcaLda
,center=TRUE
,scale=FALSE
)
### perform a two-layer cross-validation using the function tunePcaLda,
### where the number of principal components used for LDA is optimized
### (i.e., internal cross-validaiton).
RES4 <- crossValidation(data=DATA$spec
,label=DATA$labels
,batch=DATA$batch
,method=tunePcaLda
,pred=predPcaLda
,folds=NULL
,nBatch=0
,nFold=3
,verbose=TRUE
,seed=NULL
### parameters to be passed to tunePcaLda
,nPC=2:4
,cv=c('CV', 'BV')[2]
,nPart=0
,optMerit=c('Accuracy', 'Sensitivity')[2]
,center=TRUE
,scale=FALSE
)
# }
Run the code above in your browser using DataLab