Skip to content

Commit

Permalink
fix SD typo
Browse files Browse the repository at this point in the history
  • Loading branch information
timothyas committed Nov 27, 2023
1 parent 80658a9 commit f293b19
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions docs/example_macro_training.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,11 @@
" \n",
" - $SD_j$ is the standard deviation of the sample forecast, taken over space and time\n",
" $$\n",
" SD_j = \\dfrac{1}{(N_{\\text{steps}}-1)(N_v-1)}\n",
" \\sqrt{\n",
" SD_j = \\sqrt{\n",
" \\dfrac{\n",
" \\sum_{i=1}^{N_v}\\sum_{n=1}^{N_{\\text{steps}}}\\left(v_j(i, n) - \\mu_j\\right)^2\n",
" }\n",
" {(N_{\\text{steps}}-1)(N_v-1)}\n",
" }\n",
" $$\n",
" where $\\mu_j$ is the sample average taken over space and time\n",
Expand Down
2 changes: 1 addition & 1 deletion xesn/cost.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class CostFunction():
- The standard deviation used in the NRMSE calculation is
.. math::
SD_j = \dfrac{1}{(N_{\\text{steps}}-1)(N_v-1)}\sqrt{\sum_{i=1}^{N_v}\sum_{n=1}^{N_{\\text{steps}}}\left(v_j(i, n) - \mu_j\\right)^2}
SD_j = \sqrt{\dfrac{\sum_{i=1}^{N_v}\sum_{n=1}^{N_{\\text{steps}}}\left(v_j(i, n) - \mu_j\\right)^2}{(N_{\\text{steps}}-1)(N_v-1)}}
- :math:`SD_j(k)` used in the PSD_NRMSE calculation is defined similarly as above, but in spectral space, and note that each mode is normalized separately as different modes can vary by vastly different orders of magnitude
Expand Down

0 comments on commit f293b19

Please sign in to comment.