[ https://issues.apache.org/jira/browse/CLIMATE-549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ross Laidlaw updated CLIMATE-549: --------------------------------- Summary: Minor updates to the SpatialMeanOfTemporalMeanBias and RMSError metrics (was: Minor updates to RMSError metric) > Minor updates to the SpatialMeanOfTemporalMeanBias and RMSError metrics > ----------------------------------------------------------------------- > > Key: CLIMATE-549 > URL: https://issues.apache.org/jira/browse/CLIMATE-549 > Project: Apache Open Climate Workbench > Issue Type: Sub-task > Components: metrics > Reporter: Ross Laidlaw > Assignee: Ross Laidlaw > Priority: Minor > Labels: metrics > Fix For: 0.5 > > > 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)