native ruby Levenberg–Marquardt (or other curve fitting)

Discussion in 'Ruby' started by Fearless Fool, May 5, 2011.

  1. Sooner or later, my Rails app will need a good curve fitting algorithm
    -- I've used Levenberg=E2=80=93Marquardt in the past and know it works we=
    ll for
    my needs. There's even a nice set of Ruby bindings to the Gnu
    Scientific Library (GSL) package, which has an implementation of
    Levenberg=E2=80=93Marquardt.

    But. My app will be hosted on Heroku, and Heroku doesn't include GSL in
    its stack. Ergo, I need a native implementation of Levenberg=E2=80=93Mar=
    quardt
    (or other curve fitting algorithm).

    Does anyone know of a solid curve fitting algorithm implemented in
    native Ruby, preferably available as a gem?

    TIA.

    - ff

    -- =

    Posted via http://www.ruby-forum.com/.=
     
    Fearless Fool, May 5, 2011
    #1
    1. Advertising

  2. Re: native ruby Levenberg–Marquardt (or oth er curve fitting)

    On 05/05/2011 02:44 PM, Fearless Fool wrote:
    > Sooner or later, my Rails app will need a good curve fitting algorithm
    > -- I've used Levenberg–Marquardt in the past and know it works well for
    > my needs. There's even a nice set of Ruby bindings to the Gnu
    > Scientific Library (GSL) package, which has an implementation of
    > Levenberg–Marquardt.
    >
    > But. My app will be hosted on Heroku, and Heroku doesn't include GSL in
    > its stack. Ergo, I need a native implementation of Levenberg–Marquardt
    > (or other curve fitting algorithm).
    >
    > Does anyone know of a solid curve fitting algorithm implemented in
    > native Ruby, preferably available as a gem?


    Heroku does support gems with extensions, so what about ripping out the
    parts of gsl that you need, wrapping them in a little ruby ext (perhaps
    a simplified form of the gsl gem itself), and packaging that as a gem?
    This is sort of the amalgalite approach.

    The work involve might be worth keeping the same library and api that
    you are used to.
     
    Joel VanderWerf, May 5, 2011
    #2
    1. Advertising

  3. Joel VanderWerf wrote in post #996918:
    > Heroku does support gems with extensions, so what about ripping out the
    > parts of gsl that you need, wrapping them in a little ruby ext (perhaps
    > a simplified form of the gsl gem itself), and packaging that as a gem?
    > This is sort of the amalgalite approach.


    In all honesty, I used the FIT function in gnuplot (without using
    gnuplot for graphics at all) -- it might be easier to strip *its* LMA
    out than GSL.

    The learning curve for packaging up a ruby ext is probably no steeper
    than coding up an LMA package, and it's certainly a more useful skill to
    acquire. :)

    Thanks for the suggestion.

    --
    Posted via http://www.ruby-forum.com/.
     
    Fearless Fool, May 6, 2011
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    574
    Toby Inkster
    Oct 23, 2005
  2. Vinodh Kumar

    Quadratic curve fitting!

    Vinodh Kumar, Aug 11, 2003, in forum: C++
    Replies:
    6
    Views:
    5,227
    onetimeuser
    Dec 1, 2010
  3. Tom Anderson

    Curve fitting

    Tom Anderson, May 8, 2005, in forum: Python
    Replies:
    2
    Views:
    3,453
    Tom Anderson
    May 8, 2005
  4. Hicham Mouline
    Replies:
    2
    Views:
    378
    Jerry Coffin
    Sep 14, 2009
  5. Phil Rhoades

    Curve fitting to data

    Phil Rhoades, Dec 16, 2007, in forum: Ruby
    Replies:
    10
    Views:
    247
    zunzun
    Dec 18, 2007
Loading...

Share This Page