Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions R/MBOResult.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#' @title Single-Objective result object.
#' @title Single-Objective result object
#'
#' @description
#'
#' \itemize{
#' \describe{
#' \item{x [\code{list}]}{Named list of proposed optimal parameters.}
#' \item{y [\code{numeric(1)}]}{Value of objective function at \code{x},
#' either from evals during optimization or from requested final evaluations,
Expand All @@ -12,7 +12,7 @@
#' Includes all evaluated points and additional information as documented in \link{mbo_OptPath}.
#' You can convert it via \code{as.data.frame}.}
#' \item{resample.results [List of \code{\link[mlr]{ResampleResult}}]}{List of the desired \code{resample.results} if \code{resample.at} is set in \code{makeMBOControl}.}
#' \item{final.state [\code{character}] The final termination state. Gives information why the optimization ended. Possible values are
#' \item{final.state [\code{character}]}{The final termination state. Gives information why the optimization ended. Possible values are
#' \describe{
#' \item{term.iter}{Maximal number of iterations reached.}
#' \item{term.time}{Maximal running time exceeded.}
Expand All @@ -23,7 +23,7 @@
#' }
#' }
#' \item{models [List of \code{\link[mlr]{WrappedModel}}]}{List of saved regression models if \code{store.model.at} is set in \code{makeMBOControl}. The default is that it contains the model generated after the last iteration.}
#' \item{control [\code{MBOControl}] Control object used in optimization}
#' \item{control [\code{MBOControl}]}{Control object used in optimization}
#' }
#' @name MBOSingleObjResult
#' @rdname MBOSingleObjResult
Expand Down Expand Up @@ -83,20 +83,20 @@ print.MBOResult = function(x, ...) {
print(tail(as.data.frame(op), 10))
}

#' @title Multi-Objective result object.
#' @title Multi-Objective result object
#'
#' @description
#'
#' \itemize{
#' \describe{
#' \item{pareto.front [\code{matrix}]}{Pareto front of all evaluated points.}
#' \item{pareto.set [\code{list} of \code{list}s]}{Pareto set of all evaluated points.}
#' \item{pareto.inds [\code{numeric}]}{Indices of the Pareto-optimal points in the opt.path}
#' \item{opt.path [\code{\link[ParamHelpers]{OptPath}}]}{Optimization path.
#' Includes all evaluated points and additional information as documented in \link{mbo_OptPath}.
#' You can convert it via \code{as.data.frame}.}
#' \item{final.state [\code{character}] The final termination state. Gives information why the optimization ended}
#' \item{final.state [\code{character}]}{The final termination state. Gives information why the optimization ended}
#' \item{models [List of \code{\link[mlr]{WrappedModel}}]}{List of saved regression models.}
#' \item{control[\code{MBOControl}] Control object used in optimization}
#' \item{control[\code{MBOControl}]}{Control object used in optimization}
#' }
#' @name MBOMultiObjResult
#' @rdname MBOMultiObjResult
Expand Down
2 changes: 1 addition & 1 deletion R/OptProblem.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' @title OptProblem object.
#' @title OptProblem object
#' @description
#' The OptProblem contains all the constants values which define a OptProblem within our MBO Steps.
#' It is an environment and is always pointed at by the OptState.
Expand Down
2 changes: 1 addition & 1 deletion R/OptResult.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' @title OptResult object.
#' @title OptResult object
#' @description
#' The OptResult stores all entities which are not needed while optimizing but are needed to build the final result.
#' It can contains fitted surrogate models at certain times as well as resample objects.
Expand Down
2 changes: 1 addition & 1 deletion R/OptState.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' @title OptState object.
#' @title OptState object
#' @description
#' The OptState is the central component of the mbo iterations.
#' This environment contains every necessary information needed during optimization in MBO.
Expand Down
2 changes: 1 addition & 1 deletion R/SMBO.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' @title Initialize a manual sequential MBO run.
#' @title Initialize a manual sequential MBO run
#' @description When you want to run a human-in-the-loop MBO run you need to initialize it first.
#'
#' @inheritParams mbo
Expand Down
20 changes: 10 additions & 10 deletions R/doc_error_handling.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
#' process. mlrMBO tries to handle most of them as smart as possible.
#'
#' The target function could
#' \itemize{
#' \item{1}{The target function returns NA(s) or NaN(s) (plural for the multi-objective case).}
#' \item{2}{The target function stops with an error.}
#' \item{3}{The target function does not return at all (infinite or very long execution time).}
#' \item{4}{The target function crashes the whole R process.}
#' \item{5}{The surrogate machine learning model might crash.
#' Kriging quite often can run into numerical problems.}
#' \item{6}{The proposal mechanism - in multi-point or single point mode - produces
#' \enumerate{
#' \item The target function returns NA(s) or NaN(s) (plural for the multi-objective case).
#' \item The target function stops with an error.
#' \item The target function does not return at all (infinite or very long execution time).
#' \item The target function crashes the whole R process.
#' \item The surrogate machine learning model might crash.
#' Kriging quite often can run into numerical problems.
#' \item The proposal mechanism - in multi-point or single point mode - produces
#' a point which is either close to another candidate point in the same iteration or
#' an already visited point in a previous iteration.}
#' \item{7}{The mbo process exits / stops / crashes itself. Maybe because it hit a walltime.}
#' an already visited point in a previous iteration.
#' \item The mbo process exits / stops / crashes itself. Maybe because it hit a walltime.
#' }
#'
#'
Expand Down
8 changes: 4 additions & 4 deletions R/doc_mbo_OptPath.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
#' \item{prop.type}{Type of point proposal. Possible values are
#' \describe{
#' \item{initdesign}{Points actually not proposed, but in the initial design.}
#' \item{infill\_x}{Here x is a placeholder for the selected infill criterion, e.g., infill\_ei for expected improvement.}
#' \item{random\_interleave}{Uniformly sampled points added additionally to the proposed points.}
#' \item{random\_filtered}{If filtering of proposed points located too close to each other is active, these are replaced by random points.}
#' \item{final\_eval}{If \code{final.evals} is set in \code{\link{makeMBOControl}}: Final evaluations of the proposed solution to reduce noise in y.}
#' \item{infill_x}{Here x is a placeholder for the selected infill criterion, e.g., infill_ei for expected improvement.}
#' \item{random_interleave}{Uniformly sampled points added additionally to the proposed points.}
#' \item{random_filtered}{If filtering of proposed points located too close to each other is active, these are replaced by random points.}
#' \item{final_eval}{If \code{final.evals} is set in \code{\link{makeMBOControl}}: Final evaluations of the proposed solution to reduce noise in y.}
#' }
#' }
#' \item{parego.weight}{Weight vector sampled for multi-point ParEGO}
Expand Down
6 changes: 3 additions & 3 deletions R/doc_mbo_parallel.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#'
#' @description
#' In mlrMBO you can parallelize the tuning on two different levels to speed up computation:
#' \itemize{
#' \describe{
#' \item{\code{mlrMBO.feval}}{Multiple evaluations of the target function.}
#' \item{\code{mlrMBO.propose.points}}{Optimization of the infill criteria if multiple are used (e.g. ParEGO and ParallelLCB)}
#' }
Expand All @@ -11,8 +11,8 @@
#' The different levels of parallelization can be specified in \code{parallelStart*}.
#' Details for the levels mentioned above are given below:
#' \itemize{
#' \item{Evaluation of the objective function can be parallelized in cases multiple points are to be evaluated at once. These are: evaluation of the initial design, multiple proposed points per iteration and evaluation of the target function in \code{\link{exampleRun}}. (Level: \code{mlrMBO.feval})}
#' \item{Model fitting / point proposal - in some cases where independent, expensive operations are performed. (Level: \code{mlrMBO.propose.points})}
#' \item Evaluation of the objective function can be parallelized in cases multiple points are to be evaluated at once. These are: evaluation of the initial design, multiple proposed points per iteration and evaluation of the target function in \code{\link{exampleRun}}. (Level: \code{mlrMBO.feval})
#' \item Model fitting / point proposal - in some cases where independent, expensive operations are performed. (Level: \code{mlrMBO.propose.points})
#' }
#' Details regarding the latter:
#' \describe{
Expand Down
4 changes: 2 additions & 2 deletions R/exampleRun.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' @title Perform an mbo run on a test function and and visualize what happens.
#' @title Perform an mbo run on a test function and and visualize what happens
#'
#' @description
#' Usually used for 1D or 2D examples,
Expand Down Expand Up @@ -164,7 +164,7 @@ evaluate = function(fun, par.set, n.params, par.types, noisy, noisy.evals, point
}
}

#' Helper function which returns the (estimated) global optimum.
#' Helper function which returns the (estimated) global optimum
#'
#' @param run [\code{MBOExampleRun}]\cr
#' Object of type \code{MBOExampleRun}.
Expand Down
2 changes: 1 addition & 1 deletion R/exampleRunMultiObj.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' @title Perform an MBO run on a multi-objective test function and and visualize what happens.
#' @title Perform an MBO run on a multi-objective test function and and visualize what happens
#'
#' @description
#' Only available for 2D -> 2D examples,
Expand Down
2 changes: 1 addition & 1 deletion R/getMBOInfillCrit.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' @title Get properties of MBO infill criterion.
#' @title Get properties of MBO infill criterion
#'
#' @description
#' Returns properties of an infill criterion, e.g., name or id.
Expand Down
2 changes: 1 addition & 1 deletion R/getSupportedInfillOptFunctions.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' @title Get names of supported infill-criteria optimizers.
#' @title Get names of supported infill-criteria optimizers
#' @description
#' None.
#' @return [\code{character}]
Expand Down
2 changes: 1 addition & 1 deletion R/getSupportedMultipointInfillOptFunctions.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' @title Get names of supported multi-point infill-criteria optimizers.
#' @title Get names of supported multi-point infill-criteria optimizers
#'
#' @description
#' Returns all names of supported multi-point infill-criteria optimizers.
Expand Down
2 changes: 1 addition & 1 deletion R/infill_crits.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' @title Infill criteria.
#' @title Infill criteria
#'
#' @description
#' \pkg{mlrMBO} contains most of the most popular infill criteria, e.g., expected
Expand Down
2 changes: 1 addition & 1 deletion R/initCrit.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' @title Initialize an MBO infill criterion.
#' @title Initialize an MBO infill criterion
#'
#' @description
#' Some infill criteria have parameters that are dependent on values in the parameter set, design,
Expand Down
6 changes: 3 additions & 3 deletions R/makeMBOControl.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' @title Set MBO options.
#' @title Set MBO options
#'
#' @description
#' Creates a control object for MBO optimization.
Expand Down Expand Up @@ -78,7 +78,7 @@
#' Possible values are:
#' \dQuote{stop}: R exception is generated.
#' \dQuote{warn}: The error will be converted to a waring and a random point will be proposed.
#' \dQuote{quiet}: Same as warn but without the warning.
#' \dQuote{quiet}: Same as "warn" but without the warning.
#' This will overwrite the mlr setting \code{on.learner.error} for the surrogate learner.
#' Default is: \dQuote{stop}.
#'
Expand Down Expand Up @@ -165,7 +165,7 @@ makeMBOControl = function(n.objectives = 1L,
return(control)
}

#' Print mbo control object.
#' Print mbo control object
#'
#' @param x [\code{\link{MBOControl}}]\cr
#' Control object.
Expand Down
2 changes: 1 addition & 1 deletion R/makeMBOInfillCrit.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' @title Create an infill criterion.
#' @title Create an infill criterion
#'
#' @description The infill criterion guides the model based search process.
#' The most prominent infill criteria, e.g., expected improvement, lower
Expand Down
29 changes: 14 additions & 15 deletions R/makeMBOLearner.R
Original file line number Diff line number Diff line change
@@ -1,44 +1,43 @@
#' @title Generate default learner.
#' @title Generate default learner
#'
#' @description
#' This is a helper function that generates a default surrogate, based on properties of the objective
#' function and the selected infill criterion.
#'
#' For numeric-only (including integers) parameter spaces without any dependencies:
#' \itemize{
#' \item{A Kriging model \dQuote{regr.km} with kernel \dQuote{matern3_2} is created.}
#' \item{If the objective function is deterministic we add a small nugget effect (10^-8*Var(y),
#' \item A Kriging model \dQuote{regr.km} with kernel \dQuote{matern3_2} is created.
#' \item If the objective function is deterministic we add a small nugget effect (10^-8*Var(y),
#' y is vector of observed outcomes in current design) to increase numerical stability to
#' hopefully prevent crashes of DiceKriging.}
#' \item{If the objective function is noisy the nugget effect will be estimated with
#' \code{nugget.estim = TRUE} (but you can override this in \code{...}.}
#' hopefully prevent crashes of DiceKriging.
#' \item If the objective function is noisy the nugget effect will be estimated with
#' \code{nugget.estim = TRUE} (but you can override this in \code{...}.
#' Also \code{jitter} is set to \code{TRUE} to circumvent a problem with DiceKriging where already
#' trained input values produce the exact trained output.
#' For further information check the \code{$note} slot of the created learner.
#' \item{Instead of the default \code{"BFGS"} optimization method we use rgenoud (\code{"gen"}),
#' \item Instead of the default \code{"BFGS"} optimization method we use rgenoud (\code{"gen"}),
#' which is a hybrid algorithm, to combine global search based on genetic algorithms and local search
#' based on gradients.
#' This may improve the model fit and will less frequently produce a constant surrogate model.
#' You can also override this setting in \code{...}.}
#' You can also override this setting in \code{...}.
#' }
#'
#' For mixed numeric-categorical parameter spaces, or spaces with conditional parameters:
#' \itemize{
#' \item{A random regression forest \dQuote{regr.randomForest} with 500 trees is created.}
#' \item{The standard error of a prediction (if required by the infill criterion) is estimated
#' \item A random regression forest \dQuote{regr.randomForest} with 500 trees is created.
#' \item The standard error of a prediction (if required by the infill criterion) is estimated
#' by computing the jackknife-after-bootstrap.
#' This is the \code{se.method = "jackknife"} option of the \dQuote{regr.randomForest} Learner.
#' }
#' }
#'
#' If additionally dependencies are in present in the parameter space, inactive conditional parameters
#' are represented by missing \code{NA} values in the training design data.frame.
#' We simply handle those with an imputation method, added to the random forest:
#' \itemize{
#' \item{If a numeric value is inactive, i.e., missing, it will be imputed by 2 times the
#' maximum of observed values}
#' \item{If a categorical value is inactive, i.e., missing, it will be imputed by the
#' special class label \code{"__miss__"}}
#' \item If a numeric value is inactive, i.e., missing, it will be imputed by 2 times the
#' maximum of observed values
#' \item If a categorical value is inactive, i.e., missing, it will be imputed by the
#' special class label \code{"__miss__"}
#' }
#' Both of these techniques make sense for tree-based methods and are usually hard to beat, see
#' Ding et.al. (2010).
Expand Down
10 changes: 5 additions & 5 deletions R/makeMBOTrafoFunction.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' @title Create a transformation function for MBOExampleRun.
#' @title Create a transformation function for MBOExampleRun
#'
#' @description
#' Creates a transformation function for MBOExampleRun.
Expand All @@ -17,11 +17,11 @@ makeMBOTrafoFunction = function(name, fun) {
return(fun)
}

#' Transformation methods.
#' Transformation methods
#'
#' \itemize{
#' \item{\bold{logTrafo}}{\cr Natural logarithm.}
#' \item{\bold{sqrtTrafo}}{\cr Square root.}
#' \describe{
#' \item{\bold{logTrafo}}{Natural logarithm.}
#' \item{\bold{sqrtTrafo}}{Square root.}
#' }
#' If negative values occur and the trafo function can handle only positive values,
#' a shift of the form x - min(x) + 1 is performed prior to the transformation if the
Expand Down
2 changes: 1 addition & 1 deletion R/mbo.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' @title Optimizes a function with sequential model based optimization.
#' @title Optimizes a function with sequential model based optimization
#'
#' @description
#' See \link{mbo_parallel} for all parallelization options.
Expand Down
2 changes: 1 addition & 1 deletion R/mboContinue.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' @title Continues an mbo run from a save-file.
#' @title Continues an mbo run from a save-file
#'
#' @description
#' Useful if your optimization is likely to crash,
Expand Down
2 changes: 1 addition & 1 deletion R/mboFinalize.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' @title Finalizes an mbo run from a save-file.
#' @title Finalizes an mbo run from a save-file
#'
#' @description
#' Useful if your optimization didn't terminate but you want a results nonetheless.
Expand Down
2 changes: 1 addition & 1 deletion R/plotExampleRun.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' @title Renders plots for exampleRun objects and displays them.
#' @title Renders plots for exampleRun objects and displays them
#'
#' @description
#' The graphical output depends on the target function at hand.
Expand Down
2 changes: 1 addition & 1 deletion R/renderExampleRunPlot.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#' @title Renders plots for exampleRun objects, either in 1D or 2D, or
#' exampleRunMultiObj objects.
#' exampleRunMultiObj objects
#'
#' @description
#' The graphical output depends on the target function at hand.
Expand Down
2 changes: 1 addition & 1 deletion R/setMBOControlInfill.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' @title Extends mbo control object with infill criteria and infill optimizer options.
#' @title Extends mbo control object with infill criteria and infill optimizer options
#'
#' @description
#' Please note that internally all infill criteria are minimized. So for some of them,
Expand Down
7 changes: 4 additions & 3 deletions R/setMBOControlMultiObj.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#FIXME: briefly explain multi-point proposal for all three methods

#' @title Set multi-objective options.
#' @title Set multi-objective options
#' @description
#' Extends MBO control object with multi-objective specific options.
#'
Expand Down Expand Up @@ -60,6 +60,7 @@
#' @references
#' For more information on the implemented multi-objective procedures the following
#' sources might be helpful:
#'
#' Knowles, J.: ParEGO: A hybrid algorithm with on-line landscape
#' approximation for expensive multiobjective optimization problems. IEEE
#' Transactions on Evolutionary Computation, 10 (2006) 1, pp. 50-66
Expand All @@ -83,8 +84,8 @@
#' 7th International. Conf. Evolutionary Multi-Criterion Optimization (EMO
#' 2013), March 19-22, Sheffield, UK, R. Purshouse; P. J. Fleming;
#' C. M. Fonseca; S. Greco; J. Shaw, eds., 2013, vol. 7811 of Lecture
#' Notes in Computer Science, ISBN 978-3-642-37139-4, pp. 756{770,
#' doi:10.1007/978-3-642-37140-0 56}
#' Notes in Computer Science, ISBN 978-3-642-37139-4, pp. 756-770,
#' doi:10.1007/978-3-642-37140-0 56
#'
#' Jeong, S.; Obayashi, S.: Efficient global optimization (EGO) for Multi-Objective Problem and Data Mining.
#' In: Proc. IEEE Congress on
Expand Down
2 changes: 1 addition & 1 deletion R/setMBOControlMultiPoint.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' @title Set multipoint proposal options.
#' @title Set multipoint proposal options
#' @description
#' Extends an MBO control object with options for multipoint proposal.
#' @template arg_control
Expand Down
2 changes: 1 addition & 1 deletion R/setMBOControlTermination.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' @title Set termination options.
#' @title Set termination options
#'
#' @description
#' Extends an MBO control object with infill criteria and infill optimizer options.
Expand Down
2 changes: 1 addition & 1 deletion man/MBOInfillCrit.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading