

def optimize(self, timeSeries, forecastingMethods=None, startingPercentage=0.0, endPercentage=100.0):
    'Runs the optimization on the given TimeSeries.\n\n        :param TimeSeries timeSeries:    TimeSeries instance that requires an optimized forecast.\n        :param list forecastingMethods:    List of forecastingMethods that will be used for optimization.\n        :param float startingPercentage: Defines the start of the interval. This has to be a value in [0.0, 100.0].\n            It represents the value, where the error calculation should be started.\n            25.0 for example means that the first 25% of all calculated errors will be ignored.\n        :param float endPercentage:    Defines the end of the interval. This has to be a value in [0.0, 100.0].\n            It represents the value, after which all error values will be ignored. 90.0 for example means that\n            the last 10% of all local errors will be ignored.\n\n\n        :return:    Returns the optimized forecasting method with the smallest error.\n        :rtype:     (BaseForecastingMethod, Dictionary)\n\n        :raise:    Raises a :py:exc:`ValueError` ValueError if no forecastingMethods is empty.\n        '
    if ((startingPercentage is None) or (len(forecastingMethods) == 0)):
        raise ValueError('forecastingMethods cannot be empty.')

dataset/ETHPy150Open T-002/pycast/pycast/optimization/baseoptimizationmethod.py BaseOptimizationMethod.optimize/VarMisuse@29/420 `forecastingMethods`->`startingPercentage`