[SciPy-user] fminbound vs. brent

Neil Muller drnlmuller+scipy@gmail....
Mon Dec 1 06:29:11 CST 2008

On Mon, Dec 1, 2008 at 2:01 AM, Gideon Simpson <simpson@math.toronto.edu> wrote:
> Based on the documentation, I'm a bit unclear on how fminbound and
> brent, as optimization algorithms, differ.  Could someone clarify this
> for me?

brent doesn't do constrained optimisation, while fminbound does.


In [1]: import scipy.optimize as opt

In [2]: f = lambda x: x*x

In [3]: opt.brent(f, brack=(3, 4))
Out[3]: 0.0

In [4]: opt.fminbound(f, x1=3, x2=4)
Out[4]: 3.00000596086

Hope that helps.

Neil Muller

More information about the SciPy-user mailing list