如何获得类似Simplex"健壮性"与SciPy的界限一起?

时间:2016-05-08 06:22:43

标签: python scipy minimize

我想将selenium中的一个最小化方法应用于一个可能并不总是提供平滑导数的函数。我对Simplex方法的>>> driver = webdriver.Firefox() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/firefox/webdriver.py", line 64, in __init__ self.binary = capabilities.get("binary") or FirefoxBinary() File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 47, in __init__ self._start_cmd = self._get_firefox_start_cmd() File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 163, in _get_firefox_start_cmd " Please specify the firefox binary location or install firefox") RuntimeError: Could not find firefox in your system PATH. Please specify the firefox binary location or install firefox 实现感到满意,但它似乎不接受bounds参数:msg.Body = "Hi , " + txtrfname.Text.Trim() + "!\n" + " Your RCNO is " + rcno + "!\n Thank you for showning intrasted and registration Please <a href='" + activationurl + "'>click hear to activate </a> your account and enjoy our services \n Thank you."; 。阅读这个documentation似乎只有L-BFGS-B,TNC和SLSQP方法接受边界,并且所有这三个方法都以某种方式基于牛顿方法,并将计算数值导数或接受之一。

我不知道确切的术语,但我正在寻找一个类似于Simplex的&#39;或者&#39;无衍生物&#39; sicpy.minimize中接受边界的方法,但也会宽恕不能提供平滑导数的函数(一个例子是类似阶梯的行为)。现在,我做了1d。稍后我可能会添加尺寸,但现在并不重要。

1 个答案:

答案 0 :(得分:1)

我会尝试 lmfit http://cars9.uchicago.edu/software/python/lmfit/)。

虽然不是scipy的一部分,但基于它,它提供了有限的最小化。我用它进行曲线拟合和参数提取。然而,我无法说出它对你的特定功能的影响。