def __init__(self, smooth_factor=.1, **optimizer_opt):
        """Generate an optimizer from an objective function."""
        self.smooth_factor = smooth_factor
        for k, v in [  # default values
                ('method', 'L-BFGS-B'),
                ('bounds', None)]:
            if k not in optimizer_opt:
                optimizer_opt[k] = v
        super(ScipySmoothOptimizer, self).__init__(**optimizer_opt)
def __init__ ( self , smooth_factor = .1 , ** optimizer_opt ) : self . smooth_factor = smooth_factor for k , v in [ ( 'method' , 'L-BFGS-B' ) , ( 'bounds' , None ) ] : if k not in optimizer_opt : optimizer_opt [ k ] = v super ( ScipySmoothOptimizer , self ) . __init__ ( ** optimizer_opt )
Generate an optimizer from an objective function.