SURGroup / UQpy

UQpy (Uncertainty Quantification with python) is a general purpose Python toolbox for modeling uncertainty in physical and mathematical systems.
MIT License
267 stars 75 forks source link

jacobian of transformation with Nataf object #230

Open frewenta opened 7 months ago

frewenta commented 7 months ago

The Jacobian of the transformation attached to a Nataf object appears to be the same in both "directions" i.e. nataf_obj.jxz and nataf_obj.jzx are identical (shouldn't they be inverses of each other?)

Define a Nataf object::

dim=6 Rx = np.eye(dim) nataf_obj = Nataf(distributions=[dist1, dist2, dist3, dist4, dist5, dist6], corr_x=Rx)

Provide samples_z (Gaussian) and use (inverse) Nataf transformation to get samples in original (non-Gaussian) space :

nataf_obj.run(samples_z=theta.T, jacobian=True) theta_x = nataf_obj.samples_x.T

Run the Nataf transformation the opposite way:

nataf_obj.run(samples_x=theta_x.T, jacobian=True)

Inspection of the jacobians of the transformation shows jxz and jzx are identical nataf_obj.jxz and nataf_obj.jzx are identical

Would expect nataf_obj.jxz and nataf_obj.jzx to be different (and inverses of each other) (Windows 11, python 3.9)