From f293b19136e1f381a772ad7b1e09d3dc3c11c871 Mon Sep 17 00:00:00 2001 From: timothyas Date: Mon, 27 Nov 2023 15:08:19 -0700 Subject: [PATCH] fix SD typo --- docs/example_macro_training.ipynb | 6 ++++-- xesn/cost.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/example_macro_training.ipynb b/docs/example_macro_training.ipynb index 5646acc..3377469 100644 --- a/docs/example_macro_training.ipynb +++ b/docs/example_macro_training.ipynb @@ -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", diff --git a/xesn/cost.py b/xesn/cost.py index 0f8f254..3437b73 100644 --- a/xesn/cost.py +++ b/xesn/cost.py @@ -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