The main goal of mlrMBO is to optimize expensive black-box functions by model-based optimization (aka Bayesian optimization) and to provide a unified interface for different optimization tasks and algorithmic MBO variants. Supported are, among other things:

  • Efficient global optimization (EGO) of problems with numerical domain and Kriging as surrogate
  • Using arbitrary regression models from mlr as surrogates
  • Built-in parallelization using multi-point proposals
  • Mixed-space optimization with categorical and subordinate parameters, for parameter configuration and tuning
  • Multi-criteria optimization

This vignette gives a brief overview of the features of mlrMBO. A more detailed documentation can be found on: http://mlr-org.github.io/mlrMBO/.



Installing mlrMBO will also install and load the dependencies mlr, ParamHelpers, and smoof. For this tutorial, you also need the additional packages DiceKriging and randomForest.


General MBO workflow

  1. Define objective function and its parameters using the package smoof.
  2. Generate initial design (optional).
  3. Define mlr` learner for surrogate model (optional).
  4. Set up a MBO control object.
  5. Start the optimization with mbo().

As a simple example we minimize a cosine-like function with an initial design of 5 points and 10 sequential MBO iterations. Thus, the optimizer is allowed 15 evaluations of the objective function in total to approximate the optimum.

Objective Function

Instead of manually defining the objective, we use the smoof package which offers many toy and benchmark functions for optimization.

obj.fun = makeCosineMixtureFunction(1)
obj.fun = convertToMinimization(obj.fun)
## Single-objective function
## Name: Cosine Mixture Function
## Description: no description
## Tags: single-objective, discontinuous, non-differentiable, separable, scalable, multimodal
## Noisy: FALSE
## Minimize: TRUE
## Constraints: TRUE
## Number of parameters: 1
##            Type len Def  Constr Req Tunable Trafo
## x numericvector   1   - -1 to 1   -    TRUE     -
## Global optimum objective value of -0.1000 at
##   x
## 1 0