hartmann ======== .. py:module:: hartmann .. autoapi-nested-parse:: Hartmann objective function, relying on the botorch implementation. See: https://botorch.org/api/test_functions.html#botorch.test_functions.synthetic.Hartmann This code is based on the implementation by Nikita Saxena (nikita-0209) in https://github.com/alexhernandezgarcia/activelearning The implementation assumes that the inputs will be on [-1, 1]^6 as is typical in the uses of the Hartmann function. The original range is negative and is a minimisation problem. By default, the proxy values remain in this range and the absolute value of the proxy values is used as the reward function. Attributes ---------- .. autoapisummary:: hartmann.X_DOMAIN hartmann.OPTIMUM hartmann.MODES Classes ------- .. autoapisummary:: hartmann.Hartmann Module Contents --------------- .. py:data:: X_DOMAIN :value: [0, 1] .. py:data:: OPTIMUM :value: -3.32237 .. py:data:: MODES :value: [[0.2, 0.2, 0.5, 0.3, 0.3, 0.7], [0.4, 0.9, 0.9, 0.6, 0.1, 0.0], [0.3, 0.1, 0.4, 0.3, 0.3, 0.7],... .. py:class:: Hartmann(fidelity=1.0, do_domain_map = True, negate = False, reward_function = 'absolute', **kwargs) Bases: :py:obj:`gflownet.proxy.base.Proxy` :param fidelity: Fidelity of the Hartmann oracle. 1.0 corresponds to the original Hartmann. Smaller values (up to 0.0) reduce the fidelity of the oracle. :type fidelity: float :param do_domain_map: If True, the states are assumed to be in [-1, 1]^6 and are re-mapped to the standard domain in [0, 1]^6 before calling the botorch method. If False, the botorch method is called directly on the states values. :type do_domain_map: bool :param negate: If True, proxy values are multiplied by -1. :type negate: bool :param reward_function: The transformation applied to the proxy outputs to obtain a GFlowNet reward. By default, the reward function is the absolute value of proxy outputs. :type reward_function: str or Callable :param See: :type See: https://botorch.org/api/test_functions.html .. py:attribute:: fidelity :value: 1.0 .. py:attribute:: do_domain_map :value: True .. py:attribute:: function_mf_botorch .. py:method:: __call__(states) Implement this function to call the get_reward method of the appropriate Proxy Class (EI, UCB, Proxy, Oracle etc). :param states: :type states: ndarray .. py:method:: map_to_standard_domain(states) Maps a batch of input states onto the domain typically used to evaluate the Hartmann function, that is [0, 1]^6. See DOMAIN and LENGTH. It assumes that the inputs are on [-1, 1]^6