You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@climate.apache.org by "Ross Laidlaw (JIRA)" <ji...@apache.org> on 2014/11/05 23:56:34 UTC
[jira] [Created] (CLIMATE-549) Minor updates to RMSError metric
Ross Laidlaw created CLIMATE-549:
------------------------------------
Summary: Minor updates to RMSError metric
Key: CLIMATE-549
URL: https://issues.apache.org/jira/browse/CLIMATE-549
Project: Apache Open Climate Workbench
Issue Type: Sub-task
Reporter: Ross Laidlaw
Assignee: Ross Laidlaw
Priority: Minor
This task will change the variable names 'eval_dataset' and 'ref_dataset' to 'reference_dataset' and 'target_dataset' respectively, to match the convention used in the other metrics classes.
{code}
class RMSError(BinaryMetric):
'''Calculate the Root Mean Square Difference (RMS Error), with the mean
calculated over time and space.'''
def run(self, eval_dataset, ref_dataset):
'''Calculate the Root Mean Square Difference (RMS Error), with the mean
calculated over time and space.
.. note::
Overrides BinaryMetric.run()
:param eval_dataset: The dataset to evaluate against the reference
dataset
:type eval_dataset: ocw.dataset.Dataset object
:param ref_dataset: The reference dataset for the metric
:type ref_dataset: ocw.dataset.Dataset object
:returns: The RMS error, with the mean calculated over time and space
'''
sqdiff = (eval_dataset.values - ref_dataset.values) ** 2
return numpy.sqrt(sqdiff.mean())
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)