def inner_optimization_result_test(self):
        """Test for the correct result of a GridSearch optimization."""
        fm = ExponentialSmoothing()
        startingPercentage =   0.0
        endPercentage      = 100.0

        # manually select the best alpha
        self.timeSeries.normalize("second")
        results = []
        for smoothingFactor in [alpha / 100.0 for alpha in xrange(1, 100)]:    # pragma: no cover
            fm.set_parameter("smoothingFactor", smoothingFactor)
            resultTS = self.timeSeries.apply(fm)
            error = SMAPE()
            error.initialize(self.timeSeries, resultTS)
            results.append([error, smoothingFactor])

        bestManualResult = min(results, key=lambda item: item[0].get_error(startingPercentage, endPercentage))

        # Debugging
        #print ""
        #for item in results:
        #    print "Manual: %s / %s" % (str(item[0].get_error(startingPercentage, endPercentage))[:8], item[1])
        #print ""

        # automatically determine the best alpha using GridSearch
        gridSearch = GridSearch(SMAPE, precision=-2)
        # used, because we test a submethod here
        gridSearch._startingPercentage = startingPercentage
        gridSearch._endPercentage      = endPercentage
        result     = gridSearch.optimize_forecasting_method(self.timeSeries, fm)

        # the grid search should have determined the same alpha
        bestManualAlpha     = bestManualResult[1]
        errorManualResult     = bestManualResult[0].get_error()

        bestGridSearchAlpha   = result[1]["smoothingFactor"]
        errorGridSearchResult = result[0].get_error()

        # Debugging
        #print ""
        #print "GridSearch Result"
        #print "Manual:     SMAPE / Alpha: %s / %s" % (str(errorManualResult)[:8],     bestManualAlpha)
        #print "GridSearch: SMAPE / Alpha: %s / %s" % (str(errorGridSearchResult)[:8], bestGridSearchAlpha)
        #print ""

        assert str(errorGridSearchResult)[:8] >= str(errorManualResult)[:8]
        assert str(bestManualAlpha)[:5] == str(bestGridSearchAlpha)[:5]
dataset/ETHPy150Open T-002/pycast/pycast/tests/gridsearchtest.py/GridSearchTest.inner_optimization_result_test/swapped operands of `>=`