From 4fdc784f7cf6c88ab59f2ca23f23200ab9e303c5 Mon Sep 17 00:00:00 2001 From: hectornieto Date: Thu, 7 Apr 2022 11:57:20 +0200 Subject: [PATCH] Include method for centered rmds calculation --- model_evaluation/double_collocation.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/model_evaluation/double_collocation.py b/model_evaluation/double_collocation.py index e706a1b..a58776d 100644 --- a/model_evaluation/double_collocation.py +++ b/model_evaluation/double_collocation.py @@ -82,6 +82,16 @@ def error_metrics(obs, pre): return mean_bias, mae, rmse +def centered_rmsd(obs, pre): + obs, pre = remove_nans(obs, pre) + # Calculate means + obs_mean = np.mean(obs) + pre_mean = np.mean(pre) + + crmsd = np.sqrt(np.mean(((pre - pre_mean) - (obs - obs_mean))**2)) + return crmsd + + def agreement_metrics(obs, pre): """ Calculates the typical agreement measurements based on collocated