Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

quadratic and exponential regression

by halfcountplus (Hermit)
on Jan 14, 2013 at 16:52 UTC ( #1013240=perlquestion: print w/replies, xml ) Need Help??
halfcountplus has asked for the wisdom of the Perl Monks concerning the following question:

I was just wincing through math related stuff on CPAN (math makes me wince), and there seems to be a bunch of tools for linear regression, but I can't find a thing for quadratic and exponential regression.

Anyone know of anything?

Replies are listed 'Best First'.
Re: quadratic and exponential regression
by talexb (Canon) on Jan 14, 2013 at 17:49 UTC

    A long time ago, I used a Texas Instruments SR-50A to do linear regression in high school. This calculator had a single memory location, and the manual explained the procedure. Good times.

    So, if you're trying to do exponential regression, how about just doing linear regression on x, log( f( x ) ) values? You can convert that back into an exponential afterwards.

    That's what I'd try.

    Alex / talexb / Toronto

    "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

      Thanks much for the tip!

      (and the groklaw link)

Re: quadratic and exponential regression
by roboticus (Chancellor) on Jan 15, 2013 at 15:05 UTC


    I noticed Algorithm::CurveFit, and it looks like it would do the job, though it seems you have to define your error function with Math::Symbolic. It's too bad they didn't simply specify the interface to a function you could provide. (Well, they may, but a brief review of the docs didn't make that obvious to me.)


    When your only tool is a hammer, all problems look like your thumb.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1013240]
Approved by davido
Front-paged by Arunbear
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (9)
As of 2018-05-23 18:51 GMT
Find Nodes?
    Voting Booth?