Git Product home page Git Product logo

levmar's Introduction

The Levenberg-Marquardt algorithm is an iterative technique that finds a local minimum of a function that is expressed as the sum of squares of nonlinear functions. It has become a standard technique for nonlinear least-squares problems and can be thought of as a combination of steepest descent and the Gauss-Newton method. When the current solution is far from the correct one, the algorithm behaves like a steepest descent method: slow, but guaranteed to converge. When the current solution is close to the correct solution, it becomes a Gauss-Newton method.

Optional box- and linear constraints can be given. Both single and double precision floating point types are supported.

The actual algorithm is implemented in a C library which is bundled with bindings-levmar which this package depends on.

License

This library depends on bindings-levmar which is bundled together with a C library which falls under the GPL. Please be aware of this when distributing programs linked with this library. For details see the description and license of bindings-levmar.

levmar's People

Contributors

alang9 avatar ann-yang-leapyear avatar basvandijk avatar pacak avatar roelvandijk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

levmar's Issues

Support for hmatrix 0.17

With hmatrix 0.17 the compilation fails; one reason is because of deprecated modules being removed there (they just moved to the main hmatrix module, that's easy to fix); the other one is that one can no longer do

deriving instance (Eq r, Container Vector r) => Eq (Constraints r)

it has to be

deriving instance (Eq r, Container Vector r, Num r) => Eq (Constraints r)

now (wants a Num constraint). Does it make sense to add this constraint to this instance?

Build failure on ghc-6.12.3

Olaf Leidinger reported the following issue:

2011/12/22 Olaf Leidinger <[email protected]>:
> Hi!
>
> Being new to haskell, I wanted to port an app of mine to haskel in
> order to learn it. Therefore I wanted to use your levmar package. Yet,
> I am unable to build it using cabal on Scientific Linux 6.1
> using the provided compiler, ghc-6.12.3. The build fails with:
>
> $ cabal install levmar
> Resolving dependencies...
> Configuring levmar-1.2...
> Preprocessing library levmar-1.2...
> Building levmar-1.2...
> [1 of 2] Compiling Bindings.LevMar.CurryFriendly
> ( Bindings/LevMar/CurryFriendly.hs,
> dist/build/Bindings/LevMar/CurryFriendly.o ) [2 of 2] Compiling
> Numeric.LevMar   ( Numeric/LevMar.hs, dist/build/Numeric/LevMar.o )
>
> Numeric/LevMar.hs:274:4: Not in scope: `>>='
>
> Numeric/LevMar.hs:274:4: Not in scope: `fail'
>
> Numeric/LevMar.hs:276:6: Not in scope: `>>'
>
> Numeric/LevMar.hs:298:12: Not in scope: `>>='
>
> Numeric/LevMar.hs:298:12: Not in scope: `fail'
>
> Numeric/LevMar.hs:311:20: Not in scope: `>>='
>
> Numeric/LevMar.hs:311:20: Not in scope: `fail'
>
> Numeric/LevMar.hs:332:17: Not in scope: `>>='
>
> Numeric/LevMar.hs:332:17: Not in scope: `fail'
>
> Numeric/LevMar.hs:346:27: Not in scope: `>>='
>
> Numeric/LevMar.hs:346:27: Not in scope: `fail'
>
> Numeric/LevMar.hs:374:27: Not in scope: `>>='
>
> Numeric/LevMar.hs:374:27: Not in scope: `fail'
> cabal: Error: some packages failed to install:
> levmar-1.2 failed during the building phase. The exception was:
> ExitFailure 1
>
> As I didn't find the things which are out of scope in the source, I
> have no clue what's going wrong. Any idea?
>
> Best regards,
>
> Olaf

*** Exception: toEnum{StopReason}: tag (-1) is outside of enumeration's range (0,6)

I get the following runtime error in ghc 7.0.3 and ghc 7.2.1

levmar (const (singleton 0)) Nothing (replicate 2 0) (singleton 0) 0 defaultOpts mempty
Right (fromList [0.0,0.0],*** Exception: toEnum{StopReason}: tag (-1) is outside of enumeration's range (0,6)

This appears to happen whenever the parameters vector has length 2 or greater

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.