Exemplo n.º 1
0
    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])