Usually used for 1D or 2D examples,
useful for figuring out how stuff works and for teaching purposes.
Currently only parameter spaces with numerical parameters are supported.
For visualization, run `plotExampleRun`

on the resulting object.
What is displayed is documented here: `plotExampleRun`

.
Rendering the plots without displaying them is possible via the function
`renderExampleRunPlot`

.

Please note the following things:
- The true objective function (and later everything which is predicted from our surrogate model)
is evaluated on a regular spaced grid. These evaluations are stored in the result object.
You can control the resolution of this grid via `points.per.dim`

.
Parallelization of these evaluations is possible with the R package parallelMap on the level `mlrMBO.feval`

.
- In every iteration the fitted, approximating surrogate model is stored in the result object
(via `store.model.at`

in `control`

) so we can later visualize it quickly.
- The global optimum of the function (if defined) is extracted from the passed smoof function.
- If the passed objective function `fun`

does not provide the true, unnoisy objective function
some features will not be displayed (for example the gap between the best point so far and the global optimum).

exampleRun(
fun,
design = NULL,
learner = NULL,
control,
points.per.dim = 50,
noisy.evals = 10,
show.info = getOption("mlrMBO.show.info", TRUE)
)

## Arguments

fun |
[`smoof_function` ]
Fitness function to optimize.
For one dimensional target functions you can obtain a `smoof_function` by using `makeSingleObjectiveFunction` .
For multi dimensional functions use `makeMultiObjectiveFunction` .
It is possible to return even more information which will be stored
in the optimization path. To achieve this, simply append the attribute “extras”
to the return value of the target function. This has to be a named list of scalar values.
Each of these values will be stored additionally in the optimization path. |

design |
[`data.frame` ]
Initial design as data frame.
If the y-values are not already present in design, mbo will evaluate the points.
If the parameters have corresponding trafo functions, the design must not be transformed before it is passed!
Functions to generate designs are available in `ParamHelpers` : `generateDesign` , `generateGridDesign` , `generateRandomDesign` .
Default is `NULL` , which means `generateDesign` is called and a design of size 4 times number of all parameters is created
The points are drawn via `maximinLHS` to maximize the minimal distance between design points. |

learner |
[`Learner` ]
Regression learner from mlr, which is used as a surrogate to model our fitness function.
If `NULL` (default), the default learner is determined as described here: mbo_default_learner. |

control |
[`MBOControl` ]
Control object for mbo. |

points.per.dim |
[`integer` ]
Number of (regular spaced) locations at which to
sample the `fun` function per dimension.
Default is 50. |

noisy.evals |
[`integer(1)` ]
Number of function evaluations per point if `fun` is noisy.
Default is 10. |

show.info |
[`logical(1)` ]
Verbose output on console?
Default is `TRUE` . |

## Value

[`MBOExampleRun`

]