search for: pamfit1

Displaying 1 result from an estimated 1 matches for "pamfit1".

Did you mean: mlmfit1
2012 Apr 06
0
resampling syntax for caret package
...mynames outcome <- factor(as.character(colon.y),levels=c("1","2")) cv_index <- 1:length(outcome) predictions <- rep(-1,length(cv_index)) pamGrid <- seq(0.1,5,by=0.2) pamGrid <- data.frame(.threshold=pamGrid) # manual leave-one-out for (holdout in cv_index) { pamFit1 <- train(colon.x[-holdout,], outcome[-holdout], method = "pam", tuneGrid= pamGrid, trControl = trainControl(method = "cv")) predictions[holdout] = predict(pamFit1,newdata = colon.x[holdout,,drop=FALSE]) } # end examp...