Skip to content

Support correlated random inputs with a Gaussian copula #3

Description

@Krataios14

DAMOCLES currently treats every input variable as independent. That is a useful default, but it is limiting for real damage-tolerance studies where quantities such as load, temperature, strength, and toughness can be correlated.

I would like to add an opt-in Gaussian copula while leaving every existing independent-input result unchanged.

Suggested first version

  • Accept a named correlation matrix in both the Python study API and YAML configuration.
  • Define the supplied coefficients explicitly as correlations in latent normal space, rather than physical-space Pearson correlations after the marginal transforms.
  • Validate names, shape, finiteness, symmetry, unit diagonal, and positive definiteness with useful error messages.
  • Apply the copula before each marginal inverse CDF so Normal, Lognormal, Weibull, Gumbel, and Uniform variables continue to use their existing definitions.
  • Reject deterministic variables in nonzero correlation entries.
  • Preserve deterministic output for a fixed method and seed.
  • Include the configured correlations in the study result or summary so the assumption is not lost after the run.

The current Sobol sensitivity implementation assumes independent inputs, and the importance-sampling likelihood ratio is also defined for the independent case. The first implementation should reject those combinations clearly unless it adds a mathematically valid correlated formulation.

Tests

  • No behavior change when no correlation model is supplied.
  • Identity correlation reproduces the independent distributions within numerical tolerance.
  • Empirical latent-normal correlation converges to a known two- and three-variable target.
  • Each transformed marginal retains the expected distribution.
  • Invalid and near-singular matrices fail before sampling begins.
  • Python and YAML entry points produce the same samples for the same seed.

A short example using correlated stress range and toughness would make the feature much easier to use correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions