Parameter estimation with Metropolis-Hastings calling external code

Hello there,

I am currently trying to perform a parameter calibration on a 8-parameter model. The model is computed by a an external software (EMTP) and can be called through Python.

As someone familiar with bayesian methodology and MCMC solvers, I thought using a Metropolis-Hastings (MH) would be a nice idea. Albeit I just discovered OpenTurns, I thought it would be better to give it a try instead of coding myself a MH code from scratch. However, in the OpenTurns Documentation, I only found examples calling analytical functions, not external code.

Bayesian calibration of a computer code — OpenTURNS 1.25 documentation

I am not willing to build a simplified surrogate model to approximate my EMTP solver, and want the MH code to evaluate the real model through calls to external EMTP computation. In particular, I stumbled upon the OTwrapy overlayer. Do you think OTwrapy is a possible solution to use OpenTurns MH approach along with external solver ?

Welcome to otwrapy’s documentation! — otwrapy documentation

Best regards

hi,

You primarily want to have a look into the builtin module openturns.coupling_tools that allows to prepare input files and scrape output file of the external solver.
otwrapy is only interesting if you ultimately want to parallelize the evaluations (note that some solvers dont allow for parallelization).

j

Many thanks for the answer, I wasn’t aware of the existence of this openturns.coupling_tools module, so I will investigate about it

Best regards