Analytical Problems
Blackbox is primarily designed for providing an interface for high-fidelity computationally expensively problems. However, for the sake of demonstration and completeness, Blackbox contains some analytical problems that are commonly used for benchmarking optimization algorithms and surrogate models. Currently, following problems are available for use:
Modified branin function
Basic usage
To use an analytical problem provided in Blackbox, you can follow steps outlined below:
Initialize the problem class
Create a sampling plan (design of experiments)
Evaluate the sampling plan using the initialized problem class
The following code snippet shows an example of how to work with an analytical problem from Blackbox:
from pyDOE3 import lhs
from scipy.io import savemat
from blackbox.analytical_problems import Ackley
dim = 10
# initialize problem
problem = Ackley(num_inputs=dim)
# samples
x = lhs(dim, 10, criterion="cm")
x = problem.lb + (problem.ub - problem.lb) * x
y = problem(x) # evaluate samples
# save data
savemat('ackley_values.mat', {'x': x, 'y': y})
Refer api details for more information about how to use the analytical problems.