Skip to content

Commit

Permalink
Return all correlation pairs
Browse files Browse the repository at this point in the history
Users have requested to see all correlation pairs,
not just the ones that are significantly correlated.
  • Loading branch information
dafeda authored Jan 3, 2025
1 parent 09895b9 commit cad7d71
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/iterative_ensemble_smoother/experimental.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ def progress_callback(x):

if correlation_callback is not None:
corr_XY = self._cov_to_corr_inplace(cov_XY, stds_X, stds_Y)
correlation_callback(corr_XY[significant_rows])
correlation_callback(corr_XY)
return X


Expand Down
8 changes: 3 additions & 5 deletions tests/test_experimental.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,10 @@ def test_that_adaptive_localization_with_cutoff_1_equals_ensemble_prior(
)

def correlation_callback(corr_matrix):
# A correlation threshold of 1 means that no
# correlations are deemed significant.
# Therefore, the cross-correlation matrix must
# not include any parameter-response pairs.
# cross-correlation matrix contains all correlations,
# even those deemed insignificant.
print(corr_matrix)
assert corr_matrix.shape[0] == 0
assert corr_matrix.shape[0] == 50
assert corr_matrix.shape[1] == len(observations)

X_i = np.copy(X)
Expand Down

0 comments on commit cad7d71

Please sign in to comment.