zachmayer / caretEnsemble

caret models all the way down :turtle:
Other
226 stars 75 forks source link

How to comply with caret's multicore support #230

Closed kickbox closed 4 years ago

kickbox commented 6 years ago

I know in caret if I have to enable multi-core support for cross-validation one has to enable multicore through

library(doSNOW)
cl <- makeCluster(ncores)
registerDoSNOW(cl)

my_control <- trainControl(
  ...
  allowParallel = T,
  ...
)

If I wanted to enable multi-core for supporting Models, one has to mention nthread=ncores in train().

Is this the same in caretEnsemble too?

zachmayer commented 6 years ago

Yup, that should work!