BatchExperiments (version 1.4.2)

reduceResultsExperimentsParallel: Reduce very many results in parallel.

Description

Basically the same as reduceResultsExperiments but creates a few (hopefully short) jobs to reduce the results in parallel. The function internally calls batchMapQuick, does “busy-waiting” till all jobs are done and cleans all temporary files up.

The rows are ordered as ids and named with ids, so one can easily index them.

Usage

reduceResultsExperimentsParallel(reg, ids, part = NA_character_, fun, ...,
  timeout = 604800L, njobs = 20L,
  strings.as.factors = default.stringsAsFactors(), impute.val,
  apply.on.missing = FALSE, progressbar = TRUE)

Arguments

reg

[ExperimentRegistry] Registry.

ids

[integer] Ids of selected experiments. Default is all jobs for which results are available.

part

[character] Only useful for multiple result files, then defines which result file part(s) should be loaded. NA means all parts are loaded, which is the default.

fun

[function(job, res, ...)] Function to collect values from job and result res object, the latter from stored result file. Must return a named object which can be coerced to a data.frame (e.g. a list). Default is a function that simply returns res which may or may not work, depending on the type of res. We recommend to always return a named list.

...

[any] Additional arguments to fun.

timeout

[integer(1)] Seconds to wait for completion. Passed to waitForJobs. Default is 648400 (one week).

njobs

[integer(1)] Number of parallel jobs to create. Default is 20.

strings.as.factors

[logical(1)] Should all character columns in result be converted to factors? Default is default.stringsAsFactors().

impute.val

[named list] If not missing, the value of impute.val is used as a replacement for the return value of function fun on missing results. An empty list is allowed.

apply.on.missing

[logical(1)] Apply the function on jobs with missing results? The argument “res” will be NULL and must be handled in the function. This argument has no effect if impute.val is set. Default ist FALSE.

progressbar

[logical(1)] Set to FALSE to disable the progress bar. To disable all progress bars, see makeProgressBar.

Value

[data.frame]. Aggregated results, containing problem and algorithm paramaters and collected values.