native ruby Levenberg–Marquardt (or other curve fitting)

F

Fearless Fool

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/.=
 
J

Joel VanderWerf

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.
 
F

Fearless Fool

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top