MultiFidelityFunction

multi_fidelity_function.py:

Defines the MultiFidelityFunction class for encapsuling all fidelities and parameters of a multi-fidelity function. Also contains any other utility functions that are commonly used by the various mf-functions in this package.

class AdjustableMultiFidelityFunction(name, u_bound, l_bound, static_functions, adjustable_functions, fidelity_names=None, *, x_opt=None)

Bases: MultiFidelityFunction

__init__(name, u_bound, l_bound, static_functions, adjustable_functions, fidelity_names=None, *, x_opt=None)

All fidelity levels and parameters of a multi-fidelity function.

Parameters:
  • name – Name of the multi-fidelity function.

  • u_bound – Upper bound of the intended input range. Length is also used to determine the (fixed) dimensionality of the function.

  • l_bound – Lower bound of the intended input range. Must be of same length as u_bound.

  • static_functions – Iterable of function handles for the static, non-adjustable fidelities, sorted in descending order.

  • adjustable_functions – Iterable of function handles for the adjustable fidelities, sorted in descending order.

  • fidelity_names – List of names for the fidelities. Must be given to support dictionary- or attribute- style fidelity indexing, such as f[‘high’]() and f.high()

  • x_opt – Location of optimum x_opt for highest fidelity (if known).

property functions

Combined static and adjustable functions

class MultiFidelityFunction(name, u_bound, l_bound, functions, fidelity_names=None, *, x_opt=None)

Bases: object

__init__(name, u_bound, l_bound, functions, fidelity_names=None, *, x_opt=None)

All fidelity levels and parameters of a multi-fidelity function.

Parameters:
  • name – Name of the multi-fidelity function.

  • u_bound – Upper bound of the intended input range. Length is also used to determine the (fixed) dimensionality of the function.

  • l_bound – Lower bound of the intended input range. Must be of same length as u_bound.

  • functions – Iterable of function handles for the different fidelities, assumed to be sorted in descending order.

  • fidelity_names – List of names for the fidelities. Must be given to support dictionary- or attribute-style fidelity indexing, such as f[‘high’]() and f.high()

  • x_opt – Location of optimum x_opt for highest fidelity (if known).

property bounds

Lower and upper bounds as a single np.array of shape (2, ndim).

property functions
property name
property ndim

Dimensionality of the function. Inferred as len(self.u_bound).

invert(mff: MultiFidelityFunction) MultiFidelityFunction

Invert a MultiFidelityFunction by multiplying all fidelities by -1

Parameters:

mff – The MultiFidelityFunction to invert

Returns:

A new MultiFidelityFunction with the inverted fidelities