import: Import result file from EMOA experiments.

Description Usage Arguments Value

Description

When large-scale experiments are performed, e.g., in machine learning studies or benchmarking of multi-objective optimization algorithms, usually the results of experimental runs are somehow stored in files in the file system. These files are not stored arbitrarily, but rather the way they are stored follows some folder structure. Imagine we run a stochastic algorithm “myalgo” in total for 10 replications on problem instances “instance-1” and “instance-2”. The algorithm has parameters. Here, we assume the logical parameter a and the numeric parameter b to be varied. Moreover, assume that the root folder of results files is “/results/”. Then, a possible folder structure below “/results/” is “/results/instance-1/myalgo_TRUE_0.5/1/res.csv”. In order to evaluate the data one usually needs to gather all or partial results in a single, e.g., data.frame and append the instance, algorithm parameter and replication. The following import function does exactly this in a convenient manner. Here, we pass a character vector of full files paths and an essential format string. The latter is the very nice part of the function and lets the user specify the names and atomic data types of the algorithm parameters with a nice notation. For the upper example we would set param.format.string to “/results/instancec/algorithmc_al_bn/replicationi/filename.csv”. All fragments in the format string with an “{.}” appended are interpreted as parameter which should be imported from the file(s) paths. The values inside the curly braces specify the data type, e.g., “i” for “integer”.

Usage

1
2
3
import(files, param.sep = NULL, param.format.string, append.params = TRUE,
  parser = parserDatatable, combiner = rbind, continue.on.error = TRUE,
  ...)

Arguments

files

[character]
List of full paths to results files obtained, e.g., via list.files.

param.sep

[character(1)]
Character used as “split”-value to extract parameter settings from result paths.

param.format.string

[character(1)]
Formal format specification for paths to result files. E.g., “probc/xi_yn_zl/repli/filename.csv”.

append.params

[logical(1)]
Should parameter extracted from result paths be appended to results? Default is TRUE.

parser

[function(file, ...)]
Function used to read the file. Default is parserDatatable, which is basically fread, with some adapted parameters.

combiner

[function]
Function used to combine imported results from multiple results files. Default is rbind, since the default parser returns data frames.

continue.on.error

[logical(1)]
Should the import process be continued if an error occurs due to failed file or file name parsing? Default is TRUE. In this case errors are logged and a log-file is written to the current working directory.

...

[any]
Further optional arguments passed down to parser.

Value

any Reduced results (data.frame by default).


jakobbossek/experimentR documentation built on May 9, 2019, 5:05 a.m.