You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Method to correlate independent sample of input quantities using correlation matrix and Cholesky decomposition.
@@ -666,7 +672,9 @@ def correlate_sample_corr(
666
672
:param dtype: dtype of the produced sample
667
673
:type dtype: numpy.dtype, optional
668
674
:param iterate_sample: boolean to indicate if comet_maths should iterate over the different samples when introducing correlation. (This is more time-consuming but might be necessary if the different samples have different error correlations), defaults to False.
669
-
:type iterate_sample: bool
675
+
:type iterate_sample: bool, optional
676
+
:param maintain_sample_unmodified: boolean to indicate if the provided sample must remain unchanged (as opposed to introducing correlation). This requires a full copy of the sample, and thus doubles the memory required. Defaults to False.
Copy file name to clipboardExpand all lines: docs/content/random_generator.rst
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,9 +54,11 @@ generate_sample_random(), generate_sample_systematic() and generate_sample_corre
54
54
There is generate_sample_same() function that trivially generates a sample where u_x is zero and thus consists of repeats of the provided x array.
55
55
Then, there is the generate_sample_cov() function where a covariance matrix is provided instead of the u_x and corr_x (which contain the same information).
56
56
57
-
A somewhat more useful function is correlate_sample_corr(). This function can be used to add correlation to a previously generated sample.
58
-
This can particularly be useful when multiple MC samples where generated (e.g. for different variables, optionally each with their own internal
57
+
Another useful function is correlate_sample_corr(). This function can be used to add correlation to a previously generated sample.
58
+
This can particularly be useful when multiple MC samples were generated (e.g. for different variables, optionally each with their own internal
59
59
correlation) and these different samples need to be correlated (e.g. because the different variables themselves are correlated).
60
+
Note that by default the provided samples will be modified, though there is a keyword that allows to maintain the samples unchanged (at the cost of higher memory usage).
61
+
60
62
Finally, there is the generate_error_sample() function, which gives the differences between the sample generated by generate_sample() and x itself.
0 commit comments