The lagrangian package

[Tags: bsd3, library]

Numerically solve convex Lagrange multiplier problems with conjugate gradient descent.

For some background on the method of Lagrange multipliers checkout the wikipedia page

Here is an example from the Wikipedia page on Lagrange multipliers Maximize f(x, y) = x + y, subject to the constraint x^2 + y^2 = 1

> maximize 0.00001 (\[x, y] -> x + y) [(\[x, y] -> x^2 + y^2) <=> 1] 2
Right ([0.707,0.707], [-0.707])

For more information look here:

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

> maximize 0.00001 (negate . sum . map (\x -> x * log x)) [sum <=> 1] 3
Right ([0.33, 0.33, 0.33], [-0.09])

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


Change logNone available
Dependenciesad (==3.4.*), base (==4.6.*), hmatrix (==0.14.*), nonlinear-optimization (==0.3.*), vector (==0.10.*) [details]
AuthorJonathan Fischoff
Home page
UploadedSun Mar 10 06:00:17 UTC 2013 by JonathanFischoff
Downloads1510 total (74 in last 30 days)
0 []
StatusDocs uploaded by user
Build status unknown [no reports yet]




Maintainers' corner

For package maintainers and hackage trustees