lagrangian: Solve lagrangian multiplier problems

[ bsd3, library, math ] [ Propose Tags ]

Numerically solve convex lagrange multiplier problems with conjugate gradient descent.

Convexity is key, otherwise the descent algorithm can return the wrong answer.

Convexity can be tested by assuring that the hessian of the lagrangian is positive definite over region the function is defined in.

I have provided test that the hessian is positive definite at a point, which is something, but not enough to ensure that the whole function is convex.

Be that as it may, if you know what the your lagrangian is convex you can use solve to find the minimum.

For example, find the maximum entropy with the constraint that the probabilities add up to one.

solve 0.00001 (negate . sum . map (x -> x * log x), [(sum, 1)]) 3


Gives the answer ([0.33, 0.33, 0.33], [-0.09])

The first elements of the result pair are the arguments for the objective function at the minimum. The second elements are the lagrange multipliers.

Versions 0.1.0.0, 0.2.0.0, 0.2.0.1, 0.2.0.2, 0.3.0.0, 0.3.0.1, 0.4.0.0, 0.4.0.1, 0.5.0.0, 0.6.0.0, 0.6.0.1 ad (==3.4.*), base (==4.6.*), hmatrix (==0.14.*), nonlinear-optimization (==0.3.*), vector (==0.10.*) [details] BSD-3-Clause Jonathan Fischoff jonathangfischoff@gmail.com Math http://github.com/jfischoff/lagrangian by JonathanFischoff at Wed Mar 6 05:52:49 UTC 2013 NixOS:0.6.0.1 3483 total (22 in the last 30 days) (no votes yet) [estimated by rule of succession] λ λ λ Docs uploaded by userBuild status unknown Hackage Matrix CI

[Index]