Skip to content

New TMC modes: sequential, matrix and diagonal - #80

Merged
SteSeg merged 14 commits into
eepeterson:developfrom
SteSeg:config_options_in_tmcmanager
Mar 24, 2026
Merged

New TMC modes: sequential, matrix and diagonal#80
SteSeg merged 14 commits into
eepeterson:developfrom
SteSeg:config_options_in_tmcmanager

Conversation

@SteSeg

@SteSeg SteSeg commented Feb 23, 2026

Copy link
Copy Markdown
Collaborator

This PR is a follow up of #79, Introducing different modes for running the TMC uncertainty quantification.

TMC Modes

Modes available are sequential, matrix and diagonal.

sequential is the one already available implemented with #79. namely, performs one perturbation at a time (with all its realizations), for a total of perturbations-times-realizations (r*p) models/simulations/tmc-iterations. Useful for identifying the effect of every single perturbation type to the total uncertainty.

matrix mode builds a matrix of perturbations and realizations. So, for every new realization of a single perturbation, the TMCManager runs all the realizations of all the other perturbations. Such matrix of perturbations-realizations would hence have as many dimensions as the number of perturbations (p) and every dimension is as long as the number of realizations (r), ending up with a total number of models/simulations/tmc-iterations as r^p. Useful to cover the whole perturbation-realization "phase-space", but often computationally and memory prohibitive.

diagonal mode takes the matrix of the matrix mode and runs only the models on the diagonal. On the diagonal all the perturbations get a new realization (hence a new value of the perturbed parameter) simultaneously achieving, arguably, a faster convergence to the total uncertainty. Useful to get faster to total uncertainty with a TMC method.

Usage

The usage is similar, the user just needs to specify the mode to run with the TMCManager.run method:

# Instantiate tmc manager
tmc_manager = ofb.uq.TMCManager(base_model=model, perturbations=[perturb_water_density], realizations=100, rng=np.random.default_rng(42))
# Run tmc
tmc_manager.run(mode="diagonal") 

@SteSeg
SteSeg merged commit 936c886 into eepeterson:develop Mar 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant