OptimizeResult#

Note

The main output of a PyBADS run is a OptimizeResult dictionary object.

Its attributes and interface are described below.

class pybads.bads.OptimizeResult(bads=None)[source]#

It represents the optimization result. The class is based on scipy.optimize.OptimizeResult. See also: https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.OptimizeResult.html.

Attributes:

  • fun: callable
    • The objective function to be minimized.

  • non_box_cons: callable
    • Non-box constraints function (if any).

  • x0: np.ndarray
    • Initial starting point.

  • x: np.ndarray
    • The solution of the optimization.

  • fval: float
    • Value of objective function at solution.

  • fsd: float
    • Standard deviation of objective function at solution (0 if noiseless).

  • yval_vec: np.ndarray
    • Final sampled observations at the solution.

  • ysd_vec: np.ndarray
    • Standard deviations of the final sampled observations ("yval_vec").

  • mesh_size: float
    • Final mesh size.

  • func_count: int
    • Number of evaluations of the objective functions.

  • iterations: int
    • Number of iterations performed by the optimizer.

  • message: str
    • Termination message.

  • problem_type: str
    • Type of problem (unconstrained, bound constraints, non-box constraints).

  • total_time: float
    • Total time taken by the optimizer.

  • overhead: float
    • Fractional overhead taken by the optimizer, compared to function time.

  • random_seed: int
    • Random seed used by the optimizer (None if not set).

  • version: str
    • Version of the optimizer.

Parameters:
bads: pybads.BADS
  • An Instance of the BADS class. It is used to set the attributes of the optimization result.

set_attributes(bads)[source]#

Set the attributes of the dictionary.

Parameters:
  • bads: pybads.BADS

    An Instance of the BADS class. It is used to set the attributes of the optimization result.