[ 
https://issues.apache.org/jira/browse/CLIMATE-541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14190981#comment-14190981
 ] 

Ross Laidlaw commented on CLIMATE-541:
--------------------------------------

I've spoken with [~ploikith] and [~kwhitehall] for advice, and the desired 
method to be ported over is 
'calcRootMeanSquaredDifferenceAveragedOverTimeAndDomain':

{code}
def calcRootMeanSquaredDifferenceAveragedOverTimeAndDomain(evaluationData, 
referenceData):
    sqdiff = (evaluationData - referenceData)** 2
    rms = np.sqrt(sqdiff.mean())
    return rms
{code}

Both Paul L and Kim said that they didn't view the similar method 
'calcRootMeanSquareDifferenceAveragedOverTime' as being particularly useful as 
a metric.  I'll therefore port over the '...AveragedOverTimeAndDomain' method 
as the following class in ocw/metrics.py:

{code}
class RMSError(BinaryMetric):
    def run(self, eval_dataset, ref_dataset):
        sqdiff = (eval_dataset.values - ref_dataset.values) ** 2
        return numpy.sqrt(sqdiff.mean())
{code}

> Port 'calcRootMeanSquareDifferenceAveragedOverTimeAndDomain' method over to 
> ocw/metrics.py module
> -------------------------------------------------------------------------------------------------
>
>                 Key: CLIMATE-541
>                 URL: https://issues.apache.org/jira/browse/CLIMATE-541
>             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 the method from rcmet/src/main/python/rcmes/toolkit/metrics_kyo.py over 
> to the ocw/metrics.py module.  There's also a suggestion to shorten the name 
> of this method to 'RMSDifference' (or similar).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to