[SciPy-user] fminbound vs. brent

Neil Muller drnlmuller+scipy at gmail.com
Mon Dec 1 07:29:11 EST 2008


On Mon, Dec 1, 2008 at 2:01 AM, Gideon Simpson <simpson at 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.

Consider:

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
drnlmuller at gmail.com



More information about the SciPy-User mailing list