From: Joel VanderWerf Date: 2011-05-06T07:24:23+09:00 Subject: Re: native ruby Levenberg–Marquardt (or other 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.