Skip to content

Commit

Permalink
fix(UMC_generic): adjust empirical covariance formula
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrub committed Mar 6, 2023
1 parent 718edd3 commit 1d62e3a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PyDynamic/uncertainty/propagate_MonteCarlo.py
Expand Up @@ -758,9 +758,9 @@ def UMC_generic(
y = np.mean(Y, axis=0)

if compute_full_covariance:
Uy = np.matmul((Y - y).T, (Y - y)) / curr_block
Uy = np.matmul((Y - y).T, (Y - y)) / (curr_block - 1)
else:
Uy = np.mean(np.square(Y - y), axis=0)
Uy = np.sum(np.square(Y - y), axis=0) / (curr_block - 1)

else: # updating y and Uy from results of current block
K0 = m * blocksize
Expand Down

0 comments on commit 1d62e3a

Please sign in to comment.