R/gbmCluster.R

Defines functions gbmCluster

Documented in gbmCluster

gbmCluster <- function(n){
    # If number of cores (n) not given, try to work it out from the number
    # that appear to be available and the number of CV folds.
    if (is.null(n)){
      n <- parallel::detectCores()
    }
    if (n == 1){ NULL }
    else { parallel::makeCluster(n) }
}
DexGroves/gbm-lrd documentation built on May 6, 2019, 1:35 p.m.