pyuncertainnumber.opt.get_range

Functions

get_range_BO(...)

Compute the range of a black-box function using BayesOpt with vectorised or iterable function signature

get_range_BO_raw(f, design_bounds[, ...])

Compute the range of a black-box function using BayesOpt with arguments-signature function;

get_range_GA(f, dimension, varbound[, ...])

compute the range of the black-box function using GA

Module Contents

pyuncertainnumber.opt.get_range.get_range_BO(f: callable, design_bounds: list | numpy.ndarray, acquisition_function: str = 'UCB', verbose: bool = False, **kwargs) tuple[pyuncertainnumber.pba.intervals.number.Interval, dict]

Compute the range of a black-box function using BayesOpt with vectorised or iterable function signature

Parameters:
  • f (callable) – function as the objective to be optimized, with vectorised or iterable function signature

  • design_bounds (list | np.ndarray) – nested list or 2D array, containing the lower and upper bounds for each dimension; e.g. [[0, 1], [0, 1]] for 2D input space.

  • acquisition_function (str or callable, optional) – the acquisition function to be used, e.g. ‘UCB’, ‘EI’, ‘PI’. If None, defaults to ‘UCB’.

  • verbose (Boolean) – if True, prints the optimization progress

  • **kwargs – additional keyword arguments for the BayesOpt class. For example, one can pass ‘num_explorations’, ‘num_iterations’, etc.

Tip

for a less verbose output, use (convergence_curve=False, progress_bar=False)

Returns:

A tuple containing:
  • response_itvl: The interval of the minimum and maximum from the optimization of the black-box function.

  • opt_hint: A dictionary with optimal input points for the minimum and maximum values.

Return type:

Tuple[Interval, dict]

pyuncertainnumber.opt.get_range.get_range_BO_raw(f: callable, design_bounds: list, acquisition_function='UCB', verbose=False, **kwargs)

Compute the range of a black-box function using BayesOpt with arguments-signature function;

Parameters:
  • f – callable function to be optimized

  • dimension (int) – the number of dimensions of the input space

  • design_bounds (list) – each tuple contains the lower and upper bounds for each dimension

  • acquisition_function (str or callable, optional) – the acquisition function to be used, e.g. ‘UCB’, ‘EI’, ‘PI’. If None, defaults to ‘UCB’.

  • verbose (Boolean) – if True, prints the optimization progress

  • **kwargs – additional keyword arguments for the BayesOpt class

Tip

for a less verbose output, use (convergence_curve=False, progress_bar=False)

Returns:

A tuple containing:
  • response_itvl: The interval of the minimum and maximum from the optimization of the black-box function.

  • opt_hint: A dictionary with optimal input points for the minimum and maximum values.

Return type:

Tuple[Interval, dict]

pyuncertainnumber.opt.get_range.get_range_GA(f: callable, dimension: int, varbound, algorithm_param=None, verbose=False, **kwargs)

compute the range of the black-box function using GA

Parameters:

varbound (np.ndarray) – The variable bounds for the optimization.

Returns:

A tuple containing:
  • response_itvl: The interval of the minimum and maximum from the optimization of the black-box function.

  • opt_hint: A dictionary with optimal input points for the minimum and maximum values.

Return type:

Tuple[Interval, dict]

Note

It’s suggested to use EpistemicDomain which facilitates the specification of varbound.