Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

quadratic and exponential regression

by halfcountplus (Hermit)
on Jan 14, 2013 at 16:52 UTC ( [id://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 (Chancellor) 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

    halfcountplus:

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

    ...roboticus

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1013240]
Approved by davido
Front-paged by Arunbear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-03-29 09:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found