Skip to content

Commit

Permalink
Include method for centered rmds calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
hectornieto committed Apr 7, 2022
1 parent 68d0f7e commit 4fdc784
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions model_evaluation/double_collocation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4fdc784

Please # to comment.