pyuncertainnumber.opt.get_range =============================== .. py:module:: pyuncertainnumber.opt.get_range Functions --------- .. autoapisummary:: pyuncertainnumber.opt.get_range.get_range_BO pyuncertainnumber.opt.get_range.get_range_BO_raw pyuncertainnumber.opt.get_range.get_range_GA Module Contents --------------- .. py:function:: 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 :param f: function as the objective to be optimized, with vectorised or iterable function signature :type f: callable :param design_bounds: nested list or 2D array, containing the lower and upper bounds for each dimension; e.g. [[0, 1], [0, 1]] for 2D input space. :type design_bounds: list | np.ndarray :param acquisition_function: the acquisition function to be used, e.g. 'UCB', 'EI', 'PI'. If None, defaults to 'UCB'. :type acquisition_function: str or callable, optional :param verbose: if True, prints the optimization progress :type verbose: Boolean :param \*\*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. :rtype: Tuple[Interval, dict] .. py:function:: 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; :param f: callable function to be optimized :param dimension: the number of dimensions of the input space :type dimension: int :param design_bounds: each tuple contains the lower and upper bounds for each dimension :type design_bounds: list :param acquisition_function: the acquisition function to be used, e.g. 'UCB', 'EI', 'PI'. If None, defaults to 'UCB'. :type acquisition_function: str or callable, optional :param verbose: if True, prints the optimization progress :type verbose: Boolean :param \*\*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. :rtype: Tuple[Interval, dict] .. py:function:: get_range_GA(f: callable, dimension: int, varbound, algorithm_param=None, verbose=False, **kwargs) compute the range of the black-box function using GA :param varbound: The variable bounds for the optimization. :type varbound: np.ndarray :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. :rtype: Tuple[Interval, dict] .. note:: It's suggested to use `EpistemicDomain` which facilitates the specification of varbound.