Note: This feature is not yet exposed in the 2024x calibration app. It will be released in R2025x GA, which will be upgraded to the public cloud on Nov, 16, 2024.
Bayesian optimization is a design parameter improvement and optimization framework intended for very expensive “black box” objective functions (e.g., a time consuming simulation). The main goal is to get the best possible set of design parameters with a “small” number of objective function evaluations. The method relies on (i) creating and using a surrogate model (response surface) for approximating the objective function and (ii) an acquisition function for predicting the next sampling point to be attempted with the expensive objective function. The method requires being able to evaluate an “uncertainty” measure when using the surrogate response model.
In the implementation used by the material calibration kernel, the sampling phase is performed using the Latin hypercube approach based on the number of sample points and the material parameter bounds specified by the user. (Other global minimizers such as Differential Evolution, Particle Swarm and the Hybrid minimizer start with random sampling.) After the sampling phase, the Bayesian minimization may employ 1-2 “real” objective evaluations per iteration.
The method requires reasonable bounds to be specified to avoid very sparse sampling points in the parameter space. The method is intended for problems with a small number of parameter. The computational cost increases significantly with the number of iterations. (It is recommended to limit the number of iterations < 100).
The Bayesian minimizer can be used in lieu of the Latin Hypercube sampling by simply setting the number of iterations to 1 and increasing the number of sampling points as needed.
A local minimization can be run automatically from the best found location.
Bayesian minimizer has a significant number of settings and only a small subset is exposed in the UI. The default values for the exposed settings may evolve.
A possible approach to run this minimizer is to restrict the number of function evaluations to a small number (say <100) depending on how long a single objective evaluation takes.
Example #1: (I will add another example using the H-O material model example)
You can use this functionality in 2024x by setting the env variable, SMAMATCAL_ALLOWBAYESIAN=1 in your Env.txt file, you could use any of the FE mode calibrations and give the Bayesian minimizer a try.
Necking of a metal dogbone, Smaller model
This is a post from 2020 that uses FE mode and the default Nelder-Mead optimizer. The 1500 C3D8R mesh/model takes ~13 seconds to run on 1cpu on my laptop. This is not terribly expensive, so perhaps this is not a great example to use. The original setup of this example used nice round numbers in units of psi. If you open the attached 3dxml file, it should look something like this: After opening, cache the initial parameter values.
Running it as is, using the default Nelder-Mead optimizer results in a R2=1.00 (to eight decimal places) in about 2464secs ( I am using a development version). It also recovers the known parameter values quite well.
April 11, 2024, using R2024x FD01 (HotFix 1.27) on the public cloud this ran in 2367 secs.
Using the Hooke-Jeeves optimizer, this example takes 3800 secs to complete.
Now reset the parameters to their cached original values. Select the Bayesian optimizer and use all default values of controls.
Set the min/max bounds like this:
Re-cache the initialized parameter values and run a calibration. This is how it ends:
Ok, so try switching to the Nelder-Mead optimizer and click on calibration.
This zip file contains the 3dxml file for the 2020 Titanium FE mode necking example :
