lagrangian: Solve Lagrange multiplier problems

[ bsd3, library, math ] [ Propose Tags ]

Numerically solve convex Lagrange multiplier problems with conjugate gradient descent.

For some background on the method of Lagrange multipliers checkout the wikipedia page http://en.wikipedia.org/wiki/Lagrange_multiplier

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: http://en.wikipedia.org/wiki/Lagrange_multiplier#Example_1

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.

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 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
Dependencies ad (>=4 && <5), base (>=4.5 && <5), hmatrix (>=0.14 && <0.17), nonlinear-optimization (>=0.3 && <0.4), vector (>=0.10 && <0.11) [details]
License BSD-3-Clause
Author (c) Jonathan Fischoff 2012-2014, (c) Eric Pashman 2014
Maintainer jonathangfischoff@gmail.com
Category Math
Home page http://github.com/jfischoff/lagrangian
Uploaded by JonathanFischoff at 2014-10-09T06:56:36Z
Distributions
Reverse Dependencies 2 direct, 0 indirect [details]
Downloads 7308 total (15 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]