search for: repeatedcv

Displaying 6 results from an estimated 6 matches for "repeatedcv".

Did you mean: repeated
2013 Nov 15
1
Inconsistent results between caret+kernlab versions
...e: require(repmis) # For downloading from https df <- source_data('https://dl.dropboxusercontent.com/u/47973221/data.csv', sep=',') require(caret) svm.m1 <- train(df[,-1],df[,1],method='svmRadial',metric='Kappa',tunelength=5,trControl=trainControl(method='repeatedcv', number=10, repeats=10, classProbs=TRUE)) svm.m1 sessionInfo() ### Results - R2.15.2 > svm.m1 1241 samples 7 predictors 10 classes: ?O27479?, ?O31403?, ?O32057?, ?O32059?, ?O32060?, ?O32078?, ?O32089?, ?O32663?, ?O32668?, ?O32676? No pre-processing Resampling: Cross-Validation (10...
2023 May 09
1
RandomForest tuning the parameters
...gt; predict(modelFit, newdata, type = "prob") > > > > customRF$sort <- function(x) x[order(x[,1]),] > > > > customRF$levels <- function(x) x$classes > > > > > > # Set grid search parameters > > control <- trainControl(method="repeatedcv", number=10, repeats=3, > search='grid') > > > > # Outline the grid of parameters > > tunegrid <- expand.grid(.maxnodes=c(10,20,30,50), .ntree=c(100, 200, > 300)) > > set.seed(seed) > > > > # Train the model > > rf_gridsearch <- tra...
2012 Nov 29
1
Help with this error "kernlab class probability calculations failed; returning NAs"
...0 ## SAMPLING AND FORMULA dataset <- trainset index <- 1:nrow(dataset) testindex <- sample(index, trunc(length(index)*30/100)) trainset <- dataset[-testindex,] testset <- dataset[testindex,-1] ## TUNE caret / kernlab set.seed(1) MyTrainControl=trainControl( method = "repeatedcv", number=10, repeats=5, returnResamp = "all", classProbs = TRUE ) ## MODEL rbfSVM <- train(outcome~., data = trainset, method="svmRadial", preProc = c("scale"), tuneLength = 10,...
2012 May 30
1
caret() train based on cross validation - split dataset to keep sites together?
...?????? 13.8??????????28.9 18994??? 1980-04-05????????? 8.4???????????16.4 18994??? 1980-04-06????????? 8.3???????????12.6 90342??? 1980-07-13????????? 18.9??????????22.3 90342??? 1980-07-14????????? 19.3??????????28.4 EXAMPLE SCRIPT FOR MODEL FITTING fitControl <- trainControl(method = "repeatedcv", number=10, repeats=3) tuning <- read.table("temptunegrid.txt",head=T,sep=",") tuning # # Model with 100 iterations registerDoMC(4) tempmod100its <- train(watmntemp~tempa + tempb + tempc + tempd + tempe + netarea + netbuffor + strmslope + netsoilprm + netslope...
2023 May 08
1
RandomForest tuning the parameters
...omRF$prob <- function(modelFit, newdata, preProc = NULL, submodels = NULL) ? predict(modelFit, newdata, type = "prob") customRF$sort <- function(x) x[order(x[,1]),] customRF$levels <- function(x) x$classes ? # Set grid search parameters control <- trainControl(method="repeatedcv", number=10, repeats=3, search='grid') ? # Outline the grid of parameters tunegrid <- expand.grid(.maxnodes=c(10,20,30,50), .ntree=c(100, 200, 300)) set.seed(seed) ? # Train the model rf_gridsearch <- train(x=X_train_, y=y_train_, method=customRF, metric=metric, tuneGrid=tunegrid...
2023 Jul 09
0
caret package
...caret package to analyze a microarray dataset with feature selection using sbf(). My dataset is 3500 samples with 2200 genes, the outcome Y variable is a factor of 12 levels. I used the following script to run the feature selection: library(caret) ctrl <- sbfControl(functions=rfSBF, method='repeatedcv', repeats=5) ### x is a matrix of 3500x2200, y is a factor of 12 levels obj <- sbf(x, y, sbfControl=ctrl) But it has been more than 15 hours, the code is still running! My computer has the following specifications: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz 2.00 GHz, 8 cores 16.0 GB...