gives an object representing the result of Bayesian maximization over the function f over the configurations confi.


maximizes over the region represented by the region specification reg.


maximizes over configurations obtained by applying the function sampler.


applies the function nsampler to successively generate configurations starting from the confi.

Details and Options

  • BayesianMaximization[] returns a BayesianMaximizationObject[] whose properties can be obtained using BayesianMaximizationObject[]["prop"].
  • Possible properties include:
  • "EvaluationHistory"configurations and values explored during maximization
    "MaximumConfiguration"configuration found that maximizes the result from f
    "MaximumValue"estimated maximum value obtained from f
    "Method"method used for Bayesian maximization
    "NextConfiguration"configuration to sample next if maximization were continued
    "PredictorFunction"best prediction model found for the function f
    "Properties"list of all available properties
  • Configurations can be of any form accepted by Predict (single data element, list of data elements, association of data elements, etc.) and of any type accepted by Predict (numerical, textual, sounds, images, etc.).
  • The function f must output a real-number value when applied to a configuration conf.
  • BayesianMaximization[f,] attempts to find a good maximum using the smallest number of evaluations of f.
  • In BayesianMaximization[f,spec], spec defines the domain of the function f. A domain can be defined by a list of configurations, a geometric region, or a configuration generator function.
  • In BayesianMaximization[f,sampler], sampler[] must output a configuration suitable for f to be applied to it.
  • In BayesianMaximization[f,{conf1,conf2,}nsampler], nsampler[conf] must output a configuration suitable for f to be applied to it.
  • BayesianMaximization takes the following options:
  • AssumeDeterministicFalsewhether to assume that f is deterministic
    InitialEvaluationHistoryNoneinitial set of configurations and values
    MaxIterations100maximum number of iterations
    MethodAutomaticmethod used to determine configurations to evaluate
    RandomSeeding1234what seeding of pseudorandom generators should be done internally
  • Possible settings for Method include:
  • Automaticautomatically choose the method
    "MaxExpectedImprovement"maximize expected improvement over current best value
    "MaxImprovementProbability"maximize improvement probability over current best value
  • Possible settings for RandomSeeding include:
  • Automaticautomatically reseed every time the function is called
    Inheriteduse externally seeded random numbers
    seeduse an explicit integer or strings as a seed


open all close all

Basic Examples  (3)

Maximize a function over an interval:

Click for copyable input

Use the resulting BayesianMaximizationObject[] to get the estimated maximum configuration:

Click for copyable input

Get the estimated maximum function value:

Click for copyable input

Maximize a function over a set of configurations:

Click for copyable input

Get the maximum configuration over the set:

Click for copyable input

Maximize a function over a domain defined by a random generator:

Click for copyable input

Get the estimated maximum value:

Click for copyable input

Scope  (3)

Options  (4)

Applications  (2)

Possible Issues  (2)

Introduced in 2016
Updated in 2017