mfpml.problems¶
mfpml.problems.functions¶
- class FunctionWrapper(function, args=())[source]¶
Bases:
object
Object to wrap user’s function, allowing pick lability
function wrapper
- Parameters:
function (any) – function
args (tuple, optional) – additional parameters , by default ()
- class Functions[source]¶
Bases:
ABC
- _abc_impl = <_abc._abc_data object>¶
- property _get_dimension: int¶
Get dimension of the function
- Returns:
dimension – dimension of the problem
- Return type:
- property _get_low_fidelity: list¶
Get names of low fidelity functions :returns: name – name list of low fidelity functions :rtype: list
- static f(x)[source]¶
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
- Returns:
y – responses from single fidelity functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- static f_cons(x)[source]¶
constrained functions of high-fidelity function
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
- Returns:
f_cons – constrained responses from the single fidelity functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- static f_der(x)[source]¶
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
- Returns:
f_der – responses from the single fidelity functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented. Subclasses should implement this method.
- static hf(x)[source]¶
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
- Returns:
y_hf – responses from the high fidelity functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- static hf_cons(x)[source]¶
constrained functions of high-fidelity function
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
- Returns:
hf_cons – constrained responses from the high fidelity functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- static hf_der(x)[source]¶
derivative of high fidelity function
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
- Returns:
hf_der – responses from the high fidelity functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- static lf(x, factor=None)[source]¶
low fidelity function
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
factor (floatS) – a factor to control generating low fidelity functions
- Returns:
y_lf – responses from the low functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- static lf_cons(x)[source]¶
constrained functions of low-fidelity function
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
- Returns:
lf_cons – constrained responses from the low-fidelity functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- static lf_der(x)[source]¶
derivative of high fidelity function
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
- Returns:
lf_der – responses from the low functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
mfpml.problems.multifidelity_functions¶
- class ContinuousNonlinearCorrelation1D(num_dim=1)[source]¶
Bases:
MultiFidelityFunctions
Continuous Nonlinear Correlation 1D
- Parameters:
MultiFidelityFunctions (class) – base class
- _abc_impl = <_abc._abc_data object>¶
- static hf(x)[source]¶
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
- Returns:
y_hf – responses from the high fidelity functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- static lf(x)[source]¶
low fidelity function
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
factor (floatS) – a factor to control generating low fidelity functions
- Returns:
y_lf – responses from the low functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- class Forrester_1a(num_dim=1, cost=[1.0, 0.2])[source]¶
Bases:
MultiFidelityFunctions
- _abc_impl = <_abc._abc_data object>¶
- static hf(x)[source]¶
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
- Returns:
y_hf – responses from the high fidelity functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- static lf(x, factor=None)[source]¶
low fidelity function
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
factor (floatS) – a factor to control generating low fidelity functions
- Returns:
y_lf – responses from the low functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- class Forrester_1b(num_dim=1, cost=[1.0, 0.2])[source]¶
Bases:
MultiFidelityFunctions
Forrester function from Jicheng
- _abc_impl = <_abc._abc_data object>¶
- static hf(x)[source]¶
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
- Returns:
y_hf – responses from the high fidelity functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- static lf(x, factor=None)[source]¶
low fidelity function
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
factor (floatS) – a factor to control generating low fidelity functions
- Returns:
y_lf – responses from the low functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- class Forrester_1c(num_dim=1, cost=[1.0, 0.2])[source]¶
Bases:
MultiFidelityFunctions
Forrester function
- _abc_impl = <_abc._abc_data object>¶
- static hf(x)[source]¶
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
- Returns:
y_hf – responses from the high fidelity functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- static lf(x, factor=None)[source]¶
low fidelity function
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
factor (floatS) – a factor to control generating low fidelity functions
- Returns:
y_lf – responses from the low functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- class PhaseShiftedOscillations(num_dim=1)[source]¶
Bases:
MultiFidelityFunctions
Phase shifted oscillations
- Parameters:
MultiFidelityFunctions (class) – based class
- _abc_impl = <_abc._abc_data object>¶
- static hf(x)[source]¶
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
- Returns:
y_hf – responses from the high fidelity functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- static lf(x)[source]¶
low fidelity function
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
factor (floatS) – a factor to control generating low fidelity functions
- Returns:
y_lf – responses from the low functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- class mf_Bohachevsky(num_dim=2)[source]¶
Bases:
MultiFidelityFunctions
multi-fidelity Bohachevsky function
- Parameters:
MultiFidelityFunctions (class) – base class
- _abc_impl = <_abc._abc_data object>¶
- static hf(x)[source]¶
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
- Returns:
y_hf – responses from the high fidelity functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- static lf(x)[source]¶
low fidelity function
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
factor (floatS) – a factor to control generating low fidelity functions
- Returns:
y_lf – responses from the low functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- class mf_Booth(num_dim=2)[source]¶
Bases:
MultiFidelityFunctions
multi-fidelity Booth function,
- Parameters:
MultiFidelityFunctions (class) – base class
- _abc_impl = <_abc._abc_data object>¶
- static hf(x)[source]¶
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
- Returns:
y_hf – responses from the high fidelity functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- static lf(x)[source]¶
low fidelity function
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
factor (floatS) – a factor to control generating low fidelity functions
- Returns:
y_lf – responses from the low functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- class mf_Borehole(num_dim=8)[source]¶
Bases:
MultiFidelityFunctions
multi-fidelity Borehole function,
- Parameters:
MultiFidelityFunctions (class) – base class
- _abc_impl = <_abc._abc_data object>¶
-
design_space:
dict
= {'Hl': [700, 820], 'Hu': [990, 1110], 'Kw': [9855, 12045], 'L': [1120, 1680], 'Tl': [63.1, 116], 'Tu': [63070, 115600], 'r': [100, 50000], 'rw': [0.05, 0.15]}¶
- static hf(x)[source]¶
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
- Returns:
y_hf – responses from the high fidelity functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
-
input_domain:
ndarray
= array([[5.0000e-02, 1.5000e-01], [1.0000e+02, 5.0000e+04], [6.3070e+04, 1.1560e+05], [9.9000e+02, 1.1100e+03], [6.3100e+01, 1.1600e+02], [7.0000e+02, 8.2000e+02], [1.1200e+03, 1.6800e+03], [9.8550e+03, 1.2045e+04]])¶
- static lf(x)[source]¶
low fidelity function
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
factor (floatS) – a factor to control generating low fidelity functions
- Returns:
y_lf – responses from the low functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- class mf_CurrinExp(num_dim=2)[source]¶
Bases:
MultiFidelityFunctions
multi-fidelity CurrinExp function,
- Parameters:
MultiFidelityFunctions (class) – base class
- _abc_impl = <_abc._abc_data object>¶
- static hf(x)[source]¶
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
- Returns:
y_hf – responses from the high fidelity functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- static lf(x)[source]¶
low fidelity function
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
factor (floatS) – a factor to control generating low fidelity functions
- Returns:
y_lf – responses from the low functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- class mf_Discontinuous(num_dim=1)[source]¶
Bases:
MultiFidelityFunctions
multi-fidelity discontinuous function,
- Parameters:
MultiFidelityFunctions (class) – multifidelity function class
- _abc_impl = <_abc._abc_data object>¶
- static hf(x)[source]¶
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
- Returns:
y_hf – responses from the high fidelity functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- static lf(x)[source]¶
low fidelity function
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
factor (floatS) – a factor to control generating low fidelity functions
- Returns:
y_lf – responses from the low functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- class mf_Hartman3(num_dim=3, cost=[1.0, 0.2])[source]¶
Bases:
MultiFidelityFunctions
multi fidelity Hartman3 function
- Parameters:
MultiFidelityFunctions (parent class) – multi-fidelity function
- Returns:
_description_
- Return type:
_type_
- _abc_impl = <_abc._abc_data object>¶
- static hf(x)[source]¶
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
- Returns:
y_hf – responses from the high fidelity functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- static lf(x, factor=None)[source]¶
low fidelity function
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
factor (floatS) – a factor to control generating low fidelity functions
- Returns:
y_lf – responses from the low functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- class mf_Hartman6(num_dim=6, cost=[1.0, 0.1])[source]¶
Bases:
MultiFidelityFunctions
Initialization
- _abc_impl = <_abc._abc_data object>¶
-
design_space:
dict
= {'x1': [0.0, 1.0], 'x2': [0.0, 1.0], 'x3': [0.0, 1.0], 'x4': [0.0, 1.0], 'x5': [0.0, 1.0], 'x6': [0.0, 1.0]}¶
- static lf(x)[source]¶
low fidelity function
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
factor (floatS) – a factor to control generating low fidelity functions
- Returns:
y_lf – responses from the low functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- class mf_Himmelblau(num_dim=2)[source]¶
Bases:
MultiFidelityFunctions
multi-fidelity Himmelblau function,
- Parameters:
MultiFidelityFunctions (class) – base class
- _abc_impl = <_abc._abc_data object>¶
- static hf(x)[source]¶
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
- Returns:
y_hf – responses from the high fidelity functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- static lf(x)[source]¶
low fidelity function
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
factor (floatS) – a factor to control generating low fidelity functions
- Returns:
y_lf – responses from the low functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- class mf_Park91A(num_dim=4)[source]¶
Bases:
MultiFidelityFunctions
multi-fidelity Park91A function,
- Parameters:
MultiFidelityFunctions (class) – base class
- _abc_impl = <_abc._abc_data object>¶
- static hf(x)[source]¶
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
- Returns:
y_hf – responses from the high fidelity functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- static lf(x)[source]¶
low fidelity function
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
factor (floatS) – a factor to control generating low fidelity functions
- Returns:
y_lf – responses from the low functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- class mf_Park91B(num_dim=4)[source]¶
Bases:
MultiFidelityFunctions
multi-fidelity Park91B function,
- Parameters:
MultiFidelityFunctions (class) – base class
- _abc_impl = <_abc._abc_data object>¶
- static hf(x)[source]¶
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
- Returns:
y_hf – responses from the high fidelity functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- static lf(x)[source]¶
low fidelity function
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
factor (floatS) – a factor to control generating low fidelity functions
- Returns:
y_lf – responses from the low functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- class mf_Sixhump(num_dim=2, cost=[1.0, 0.2])[source]¶
Bases:
MultiFidelityFunctions
Initialization
- _abc_impl = <_abc._abc_data object>¶
- static hf(x)[source]¶
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
- Returns:
y_hf – responses from the high fidelity functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- static lf(x)[source]¶
low fidelity function
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
factor (floatS) – a factor to control generating low fidelity functions
- Returns:
y_lf – responses from the low functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
mfpml.problems.singlefidelity_functions¶
- class Ackley(num_dim, a=20, b=0.2, c=6.283185307179586)[source]¶
Bases:
Functions
- Parameters:
- _abc_impl = <_abc._abc_data object>¶
- f(x)[source]¶
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
- Returns:
y – responses from single fidelity functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- class AckleyN2(num_dim=2)[source]¶
Bases:
Functions
- _abc_impl = <_abc._abc_data object>¶
- static f(x)[source]¶
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
- Returns:
y – responses from single fidelity functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- class Branin(num_dim=2)[source]¶
Bases:
Functions
Initialization
- _abc_impl = <_abc._abc_data object>¶
- static f(x)[source]¶
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
- Returns:
y – responses from single fidelity functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- class Forrester(num_dim=1)[source]¶
Bases:
Functions
Forrester function
- _abc_impl = <_abc._abc_data object>¶
- static f(x)[source]¶
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
- Returns:
y – responses from single fidelity functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- class GoldPrice(num_dim=2)[source]¶
Bases:
Functions
Initialization
- _abc_impl = <_abc._abc_data object>¶
- static f(x)[source]¶
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
- Returns:
y – responses from single fidelity functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- class Hartman3(num_dim=3)[source]¶
Bases:
Functions
Initialization
- _abc_impl = <_abc._abc_data object>¶
- static f(x)[source]¶
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
- Returns:
y – responses from single fidelity functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- class Hartman6(num_dim=6)[source]¶
Bases:
Functions
Initialization
- _abc_impl = <_abc._abc_data object>¶
- static f(x)[source]¶
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
- Returns:
y – responses from single fidelity functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- class Sasena(num_dim=2)[source]¶
Bases:
Functions
Initialization
- _abc_impl = <_abc._abc_data object>¶
- static f(x)[source]¶
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
- Returns:
y – responses from single fidelity functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- class Sixhump(num_dim=2)[source]¶
Bases:
Functions
Initialization
- _abc_impl = <_abc._abc_data object>¶
- static f(x)[source]¶
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
- Returns:
y – responses from single fidelity functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.
- class Thevenot(num_dim, m=5.0, beta=15)[source]¶
Bases:
Functions
- __update_parameters()¶
- _abc_impl = <_abc._abc_data object>¶
- f(x)[source]¶
- Parameters:
x (np.ndarray) – design scheme that needs to be evaluated
- Returns:
y – responses from single fidelity functions
- Return type:
np.ndarray
- Raises:
NotImplementedError – Raised when not implemented.