This document summarizes the structure of inputs and outputs of each function that composes MetaTuner. It is intended as a general guide for future contributions and code maintenance.

Function: SanityCheck()

Performs all checks on the input parameters, to make sure everything is nominal.

Function: GenerateInitialSample()

Generates an initial sample of candidate configurations in the space of tunable parameters

Function: SampleInstances()

Samples (without replacement) instances for the tuning process.

Function: EvaluateConfigurations()

Runs the algorithm (equipped with the candidate configurations) on a sample of instances, and calculates a summary performance index for each configuration.

IMPORTANT: config.list

The list config.list is possibly the most important variable in the metatuner flow, as it stores all information regarding the candidate configurations and their performance values. Its fields are: - config.list$A, a list vector where each element i has three fields:

    - `config.list$A[[i]]$config`, containing the (normalized) values 
    of the parameters for the i-th configuration.

    - `config.list$A[[i]]$Yij`, data frame containing the IDs of each 
    instances already visited by the i-th configuration, and the (raw) 
    performance observed for the configuration on those instances.

    - `config.list$A[[i]]$perf`, numeric scalar containing the 
    summarized performance attributed to the i-th configuration.

- `config.list$nruns`, number of runs of `algo.runner` executed so far.

- `config.list$Yij.all`, data frame containing the (raw) performance 
observed for all configurations in `config.list$A` on the instances 
visited by each one. If a given candidate configuration has not yet
visited a given instance the value is set as `NA`.

- `config.list$Yij.norm`, data.frame containing the (normalized) 
performance of each candidate configuration on each instance visited.

- `config.list$config.perf`, data frame summarizing the available 
information: has one column for each tunable parameter (normalized), 
plus one final column `perf` containing the summarized performance value of 
each configuration.

Function: FitModels()

Fits regression models of performance vs parameter values. This function is a wrapper for specific model fitting functions (currently available: FitLinearModels() and FitQuantileModels()). If new regression models are added they must be called from within this function (and the internal checks of FitModels() must be updated accordingly.

Function: OptimizeModels()

Optimizes each model returned by FitModels() and returns new candidate configurations.

IMPORTANT: OptimizeModels() verifies the class of the model objects returned by FitModels() to invoke the correct predict method. If new types of models are added this routine must be updated accordingly.

Function: FilterRepeatedConfigurations()

Removes redundant (repeated) candidate configurations.


Output structure of metatuner()

The output structure of metatuner() is essentially the final config.list, with some modifications: - the configurations in config.list$A and config.list$config.perf are denormalized (i.e., are returned in their original scales). - adds field config.list$elite.confs containing the best configurations found (in decreasing order of quality). - adds field config.list$metatuner.inputs, containing all input parameters used in the call to metatuner() (for improved reproducibility).



fcampelo/MetaTuner documentation built on May 29, 2019, 9:14 a.m.