Parallel Processing in R in caret

前端 未结 3 443
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-03 10:58

It is given in the caret documentation that to allow parallel processing the following code works

library(doMC) 
registerDoMC(cores = 5) 
## All subsequent mode         


        
3条回答
  •  甜味超标
    2021-02-03 11:36

    Usually I do it like this adding allowParallel= TRUE :

    svmopt.caret=train(Y~.,data=nearsep1,method="svmLinear",
                       trControl=trainControl(method="cv",number=10,search="grid"),
                       tuneGrid=paramgrid,
                       allowParallel=TRUE)
    

提交回复
热议问题