Repository: climate
Updated Branches:
  refs/heads/master 2cb39791e -> 56a3163ef


CLIMATE-585 Fixed the bias calculation ordering

- Update bias calculation orderings in Bias, TemporalMeanBias, and
  SpatialMeanOfTemporalMeanBias Metrics.


Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/3935c247
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/3935c247
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/3935c247

Branch: refs/heads/master
Commit: 3935c247acd481b267d85f0791f37f5758441bf2
Parents: 2cb3979
Author: Kim Whitehall <[email protected]>
Authored: Mon Feb 23 08:06:54 2015 -0500
Committer: Michael Joyce <[email protected]>
Committed: Thu Mar 12 09:24:10 2015 -0700

----------------------------------------------------------------------
 ocw/metrics.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/climate/blob/3935c247/ocw/metrics.py
----------------------------------------------------------------------
diff --git a/ocw/metrics.py b/ocw/metrics.py
index 855d4e3..47c20de 100644
--- a/ocw/metrics.py
+++ b/ocw/metrics.py
@@ -86,7 +86,7 @@ class Bias(BinaryMetric):
         :returns: The difference between the reference and target datasets.
         :rtype: :class:`numpy.ndarray`
         '''
-        return ref_dataset.values - target_dataset.values
+        return target_dataset.values - ref_dataset.values  
 
 
 class TemporalStdDev(UnaryMetric):
@@ -210,7 +210,7 @@ class TemporalMeanBias(BinaryMetric):
         :returns: The mean bias between a reference and target dataset over 
time.
         '''
 
-        diff = ref_dataset.values - target_dataset.values
+        diff = target_dataset.values - ref_dataset.values 
         if absolute:
             diff = abs(diff)
         mean_bias = diff.mean(axis=0)
@@ -238,7 +238,7 @@ class SpatialMeanOfTemporalMeanBias(BinaryMetric):
         :returns: The bias averaged over time and domain
         '''
 
-        bias = reference_dataset.values - target_dataset.values
+        bias = target_dataset.values - reference_dataset.values 
         return bias.mean()
 
 

Reply via email to