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) }
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.