

def __init__(self, errorMeasureClass, errorMeasureInitializationParameters=None, precision=(- 1)):
    'Initializes the optimization method.\n\n        :param BaseErrorMeasure errorMeasureClass:    Error measure class from :py:mod:`pycast.errors`.\n        :param dictionary errorMeasureInitializationParameters:    Parameters used to initialize\n            the errorMeasureClass. This dictionary will be passed to the errorMeasureClass as \\*\\*kwargs.\n        :param integer precision:    Defines the accuracy for parameter tuning in 10^precision.\n            This parameter has to be an integer in [-7, 0].\n\n        :raise:    Raises a :py:exc:`TypeError` if errorMeasureClass is not a valid class.\n            Valid classes are derived from :py:class:`pycast.errors.BaseErrorMeasure`.\n        :raise:    Raises a :py:exc:`ValueError` if precision is not in [-7, 0].\n        '
    if (errorMeasureInitializationParameters is None):
        errorMeasureInitializationParameters = {
            
        }
    if (not isinstance(errorMeasureClass, (type, types.ClassType))):
        raise TypeError('errorMeasureClass has to be of type pycast.errors.BaseErrorMeasure or of an inherited class.')
    if (not issubclass(errorMeasureClass, BaseErrorMeasure)):
        raise TypeError('errorMeasureClass has to be of type pycast.errors.BaseErrorMeasure or of an inherited class.')
    if (not ((- 7) <= precision <= 0)):
        raise ValueError('precision has to be in [-7,0].')
    super(BaseOptimizationMethod, self).__init__()
    self._precison = int(precision)
    self._errorClass = errorMeasureClass
    self._errorMeasureKWArgs = errorMeasureInitializationParameters

dataset/ETHPy150Open T-002/pycast/pycast/optimization/baseoptimizationmethod.py BaseOptimizationMethod.__init__/original