romtools.workflows.inverse.run_mf_eki#

romtools.workflows.inverse.run_mf_eki(model, rom_model_builder, parameter_space, observations, observations_covariance, parameter_mins=None, parameter_maxes=None, absolute_eki_directory='/home/runner/work/rom-tools-and-workflows/rom-tools-and-workflows/work/', fom_ensemble_size=10, rom_extra_ensemble_size=30, rom_tolerance=0.005, use_updated_rom_in_update_on_rebuild=True, initial_step_size=0.1, regularization_parameter=0.0001, step_size_growth_factor=1.25, step_size_decay_factor=2.0, max_step_size_decrease_trys=5, relaxation_parameter=1.05, error_norm_tolerance=1e-05, delta_params_tolerance=0.0001, max_rom_training_history=1, max_iterations=50, random_seed=1, fom_evaluation_concurrency=1, rom_evaluation_concurrency=1, restart_file=None)[source]#

Run a multi-fidelity ensemble Kalman inversion (MF-EKI) workflow.

This routine couples a high-fidelity model with ROM evaluations built on the fly from FOM training data. It supports adaptive step sizing, ROM refresh based on QoI error, and concurrent evaluation of FOM/ROM samples.

Parameters:
  • model (QoiModel) – High-fidelity QoiModel.

  • rom_model_builder (QoiModelBuilderWithTrainingData) – Builder for ROM models from training data and directories.

  • parameter_space (ParameterSpace) – ParameterSpace used to draw the initial ensemble.

  • observations (ndarray) – Observed QoI vector.

  • observations_covariance (ndarray) – Observation covariance matrix.

  • parameter_mins (ndarray) – Optional lower bounds on parameters.

  • parameter_maxes (ndarray) – Optional upper bounds on parameters.

  • absolute_eki_directory (str) – Absolute path to the working directory for runs.

  • fom_ensemble_size (int) – Number of FOM samples per iteration.

  • rom_extra_ensemble_size – Extra ROM-only samples per iteration.

  • rom_tolerance (float) – Relative QoI error threshold for ROM rebuilds.

  • use_updated_rom_in_update_on_rebuild (bool) – When True, use the updated ROM in the update for that step. When False, use the previous ROM in the update for that step.

  • initial_step_size (float) – Initial step size for the update.

  • regularization_parameter (float) – Tikhonov regularization parameter.

  • step_size_growth_factor (float) – Growth factor when a step is accepted.

  • step_size_decay_factor (float) – Decay factor when a step is rejected.

  • max_step_size_decrease_trys (int) – Max consecutive step reductions before exit.

  • relaxation_parameter (float) – Error reduction factor for step acceptance.

  • error_norm_tolerance (float) – Stop when mean error norm falls below this value.

  • delta_params_tolerance (float) – Stop when parameter update norm falls below this value.

  • max_rom_training_history (int) – Max number of training iterations to keep.

  • max_iterations (int) – Maximum number of EKI iterations.

  • random_seed (int) – RNG seed for initial sampling.

  • fom_evaluation_concurrency (int) – Concurrent FOM evaluations per iteration.

  • rom_evaluation_concurrency (int) – Concurrent ROM evaluations per iteration.

  • restart_file (str) – Optional restart file path.

Returns:

Tuple of (fom_parameter_samples, fom_qois) from the final iteration.