aitoa.load.log.file: Load a Single Log File

Description Usage Arguments Value See Also

View source: R/load_log_file.R

Description

Load a log file and return the results as a data frame. The data frame will have (at most) three columns:

t

contains the time in milliseconds consumed since the start of the optimization process and is monotonously increasing

fes

contains the number of objective function evaluations since the start of the optimization process and is strictly monotonously increasing

f

contains the objective value and is strictly monotonously decreasing, with the except of the last point which might have the same objective value as the second-to-last point.

The data frame will be enriched with four attributes:

file

the normalized absolute file path to the log file

algorithm

the id of the algorithm used to generate the log file

instance

the problem instance to which the algorithm was applied

seed

the hexadecimal string representation of the random seed

Time and FEs have a resolution of 1 and a maximum value of 2^53 - 1, as this is the highest integer value that can represented precisely with a double. If a higher value is encountered in any of the two columns, stop will be invoked, i.e., higher values are not permitted. In order to test for this, we use the 64 bit integers from the bit64 package, since R does not support 64 bit integers natively.

Usage

1
2
3
4
5
6
aitoa.load.log.file(
  file,
  keep.columns = c("fes", "t", "f"),
  make.time.unique = FALSE,
  f.must.be.improving = TRUE
)

Arguments

file

the log file to load

keep.columns

the columns to keep, any vector containing elements "t" (for time), "f" (for the objective value), and "fes" (for the consumed FEs)

make.time.unique

should we make the time indices unique (except maybe for the first and last point)? This makes sense when we want to plot diagrams over a time axis, as we then have removed redundant points right away. If make.time.unique==FALSE, then there may be multiple improvements at the same time index due to the resolution of the computer clock (while each improvement will definitely have a unique FE).

f.must.be.improving

true if the logged objective values must be strictly improving? This is the default way logs are generated by aitoa. However, you can also create a log where every single sampled solution is logged, so then you must set f.must.be.improving=FALSE to load the data.

Value

a data frame with the columns t (time in ms), fes (function evaluations), and f (objective value), all of which are numeric or integer valued, with integer type being preferred if it can be used without loss of precision

See Also

aitoa.parse.file.name


thomasWeise/aitoaEvaluate documentation built on Dec. 6, 2020, 1:22 p.m.