def local_error_test(self):
        """Test MeanSignedDifferenceError.local_error."""
        localErrors = [0.2,	-0.3, -0.4, 0.5, -0.5, 0.3, 0.2, 0.6, -0.3, 0.5, 0]

        msd = MeanSignedDifferenceError()

        for i in xrange(len(self.dataOrg)):
            calc_local_error = msd.local_error([self.dataOrg[i]], [self.dataCalc[i]])
            self.assertEquals("%.4f" % calc_local_error,"%.4f" % localErrors[i])
    def local_error_test(self):
        """Test MeanSignedDifferenceError.local_error."""
        localErrors = [0.2, -0.3, -0.4, 0.5, -0.5, 0.3, 0.2, 0.6, -0.3, 0.5, 0]

        msd = MeanSignedDifferenceError()

        for i in xrange(len(self.dataOrg)):
            calc_local_error = msd.local_error([self.dataOrg[i]],
                                               [self.dataCalc[i]])
            self.assertEquals("%.4f" % calc_local_error,
                              "%.4f" % localErrors[i])
    def error_calculation_test(self):

        msd = MeanSignedDifferenceError()

        tsOrg = TimeSeries()
        tsCalc = TimeSeries()

        for idx in xrange(len(self.dataOrg)):
            tsOrg.add_entry(float(idx), self.dataOrg[idx])
            tsCalc.add_entry(float(idx), self.dataCalc[idx])

        msd.initialize(tsOrg, tsCalc)

        self.assertEquals(str(msd.get_error())[:6], '0.0727')
    def error_calculation_test(self):

        msd = MeanSignedDifferenceError()

        tsOrg  = TimeSeries()
        tsCalc = TimeSeries()

        for idx in xrange(len(self.dataOrg)):
            tsOrg.add_entry(float(idx),  self.dataOrg[idx])
            tsCalc.add_entry(float(idx), self.dataCalc[idx])

        msd.initialize(tsOrg, tsCalc)

        self.assertEquals(str(msd.get_error())[:6], '0.0727')