[
https://issues.apache.org/jira/browse/CLIMATE-540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14189322#comment-14189322
]
Ross Laidlaw commented on CLIMATE-540:
--------------------------------------
The {{calcBiasAveragedOverTime}} method has already been ported over to
ocw/metrics.py to the {{MeanBias}} class. In {{MeanBias}} the mean is
calculated over the time axis:
{code}
def run(self, ref_dataset, target_dataset, absolute=False):
diff = ref_dataset.values - target_dataset.values
if absolute:
diff = abs(diff)
mean_bias = diff.mean(axis=0)
return mean_bias
{code}
This is different from {{calcBiasAveragedOverTimeAndDomain}}, where the mean is
calculated over the whole numpy structure using mean(), returning a single
value:
{code}
def calcBiasAveragedOverTimeAndDomain(evaluationData, referenceData):
diff = evaluationData - referenceData
bias = diff.mean()
return bias
{code}
(The name of the variable 'bias' in the return statement above is a bit
misleading... This will be changed in the new metric.)
>From [~ploikith]'s suggestion, we could implement this metric in a class
>called {{SpatialMeanOfTemporalMeanBias}}. To make things clearer, shall we
>change the name of the {{MeanBias}} class to {{TemporalMeanBias}}? I've
>spoken with Dr [~kwhitehall] and she supports this change.
> Port 'calcBiasAveragedOverTimeAndDomain' method over to ocw/metrics.py module
> -----------------------------------------------------------------------------
>
> Key: CLIMATE-540
> URL: https://issues.apache.org/jira/browse/CLIMATE-540
> Project: Apache Open Climate Workbench
> Issue Type: Sub-task
> Components: metrics
> Affects Versions: 0.4
> Reporter: Ross Laidlaw
> Assignee: Ross Laidlaw
> Fix For: 0.5
>
>
> Port this method over from rcmet/src/main/python/rcmes/toolkit/metrics_kyo.py
> to ocw/metrics.py. [~ploikith] suggested that we should rename the method to
> clarify what it does. For example: SpatialMeanOfTemporalMeanBias.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)