Description Usage Arguments Tunable Parameters Tuning Instances Algorithm Runner Initial Sampling Methods Statistical Modeling Optimization Methods
Search for parameter configurations that are expected to yield the best performance for a given optimizer on instances belonging to the same problem class as those used in the tuning effort. Currently the method only works for parameters that are box-constained, continuous, and Real.
1 2 3 4 5 6 | metatuner(parameters, tuning.instances, algo.runner, elite.confs, budget,
m0 = 3 * nrow(parameters), mi = 5L, initial.sampling = "lhs",
ndigits = 3L, N0 = 5L, Ni = 1L, summary.function = "median",
model.type = "quantile", model.order = 3L,
optimization.method = "Nelder-Mead", ncores = 1L,
seed = as.integer(Sys.time()))
|
parameters |
data frame containing the parameter names and bound constraints. See Section Tunable Parameters for details. |
tuning.instances |
list of instances available for tuning. See Section Tuning Instances for details. |
algo.runner |
name of function used for evaluating the configurations. See Section Algorithm Runner for details. |
elite.confs |
number of elite configurations to maintain at each iteration. |
budget |
number of algorithm runs allocated for the tuning effort. |
m0 |
initial number of configurations to be generated. Defaults to
|
mi |
number of new configurations to generate at each iteration.
Defaults to |
initial.sampling |
type of method to be used in the generation of the initial sample. See Section Initial Sampling Methods for details. Defaults to "lhs". |
ndigits |
integer with the number of digits to use as the resolution of
each parameter (i.e., the parameter will have |
N0 |
initial number of instances to sample. Defaults to |
Ni |
number of new instances to add at each iteration. Defaults to |
summary.function |
name of function for aggregating the (scaled)
output values of |
model.type |
Type of regression model to use. See Section Statistical Models for details. |
model.order |
Order of the model to fit. Defaults to |
optimization.method |
optimization method to use for estimating new configurations. See Section Optimization Methods for details. Defaults to "Nelder-Mead". |
ncores |
number of processor cores to use. Receives either an integer or the value "max", in which case the method uses all available cores, minus one. |
seed |
seed for the random number generator. Use a scalar integer value. |
The parameters to be tuned are passed to metatuner
as a data frame
containing three columns:
name
, with a unique name for each parameter.
minx
, with the smallest allowed value for each parameter.
maxx
, with the largest allowed value for each parameter.
The problem instances available for the tuning effort must be passed as
list vector tuning.instances
, in which each position contains the following
fields:
FUN
, the name of the function that implements the instance. Must
have a formal argument X
(e.g., myfun <- function(X){...}
),
which can be either a numeric vector or a matrix of row vectors.
xmin
, the lower bound for the optimization variables
xmax
, the upper bound for the optimization variables
alias
(optional), an alias for the instance
The algo.runner
parameter points to a function that receive the instance
configuration (i.e., one element of the list vector tuning.instance
) and
a numeric vector with the values of the tunable parameters (e.g.,
myalgo <- function(instance, params){...}
), and return a single scalar
quantifying the performance of the algorithm equipped with that configuration
for that particular instance.
IMPORTANT: metatuner
assumes one wants to minimize the expected
output of algo.runner
. When working with quality indicators that should be
maximize, please do not forget to multiply this output by -1
in the
output of algo.runner
.
metatuner
generates the initial sampling of the space of configurations
using the method given in initial.sampling
. Currently available methods
are:
Latin hypercube sampling ("lhs"): a space-covering design based on Latin
Hypercube Sampling (uses package lhs
).
Low-discrepancy sequences of points ("sobol"): a space-covering design
using Sobol's low-discrepancy sequences of points (uses package
SobolSequence
).
Parameter model.type
informs metatuner
of the type of regression model to
fit. Currently implemented alternatives are:
linear
for linear regression using OLS.
quantile
for quantile regression (uses package quantreg
).
lasso
for lasso regression (uses package hqreg
)
ridge
for ridge regression (uses package hqreg
)
In all cases metatuner
fits a polynomial model to the performance data
gathered from running the candidate configurations on the tuning instances.
Parameter model.order
is used to inform the (maximum) order of the
polynomial model to be fitted.
metatuner
uses stats::constrOptim()
to optimize the predicted quality of
algo.runner
with regards to its tunable parameters. Any method that does
not require an explicit function for returning gradient / Hessian information
can be used as optimization.method
. Currently we recommend using
Nelder-Mead
, but SANN
is also a (usually slower) possibility.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.