Skip to contents

This function initializes a local H2O cluster for use with the h2o machine learning library.

Usage

init_h2o(nthreads = c("half", "minus1", "all"))

Arguments

nthreads

(character) how many threads (cores) to dedicate to the H2O cluster (see Details)

Value

New local cluster initialized (return value is given by h2o::h2o.init())

Details

The number of available threads is determined using parallel::detectCores(). The nthreads option needs to be one of:

  • half: Half of all available cores (the default)

  • minus1: All available threads minus 1 (to avoid freezing)

  • all: All available cores (not recommended; this can freeze your machine)

The H2O cluster requires Java to be installed on your machine. Normally the graphical interface to interact with the cluster is available by browser at localhost:54321. Refer to the h2o documentation for more information.

Examples

if (FALSE) {
init_h2o() # half cores
init_h2o("minus1") # all but one cores
}