Home Forums HCL Reviews Tutorials Articles Register Search Today's Posts Mark Forums Read
 LinuxQuestions.org Recover a formula from a data table
 Programming This forum is for all programming questions. The question does not have to be directly related to Linux and any language is fair game.

Notices

 05-30-2007, 12:38 PM #1 Telemako LQ Newbie   Registered: Nov 2005 Posts: 4 Rep: Recover a formula from a data table Hello and thanks for reading. I have a table with data. Each row determines a value called X, that I also have. What I'll like to do is recover the formula that calculates this X value. I think this is called data interpolation but I don't know how to do it =/ I have a lot of this data so I can at least get an approximation to the original formula, but how can I automate that? I have the data on an opencalc sheet, but I can adapt to any programming language. Any tips? Example Code: ```A B C D E F G X 25 26 1 7 9 11 24 1,6 23 23 1 6 11 11 24 1,6 20 16 2 6 21 10 21 1,8 21 4 2 9 17 10 33 2 25 22 2 9 19 14 32 2 27 35 1 9 24 6 26 2 24 19 2 10 20 11 26 2 25 28 2 7 18 13 26 2 25 35 1 8 19 11 32 2,2 21 18 2 4 14 13 34 2,2 23 9 1 7 22 8 35 2,2 26 32 1 13 8 10 30 2,2```
 05-30-2007, 03:05 PM #2 weibullguy ReliaFree Maintainer   Registered: Aug 2004 Location: Kalamazoo, Michigan Distribution: Slackware-current, Cross Linux from Scratch, Gentoo Posts: 2,812 Blog Entries: 1 Rep: Presuming that X is a function of A-G, you are fitting a model to the data not interpolating. You can't really "recover" the formula that generated your data set. The best you can do is find the model that best describes your data. That model will be meaningless because there is no context within which to work; all you have is bunch of numbers. Generally we have some understanding of the phenomena we're investigating that will help us choose a model family rather than blindly stab in the dark. There are many methods for fitting a model to your data. You may have been introduced to linear regression in the past. That may not be the most appropriate method, but would be a good place to start. There is an application available in most Linux distro's repositories named R (http://www.r-project.org/). It is also available for Windows. It will do what you want. Last edited by weibullguy; 05-30-2007 at 03:09 PM.

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is Off HTML code is Off Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post ariadneN Linux - General 3 07-26-2006 02:13 PM NeoSpawn Linux - Software 2 09-04-2005 11:37 AM djib Linux - Software 2 05-14-2005 07:07 AM yogeshwar_s Linux - Hardware 1 09-22-2004 02:02 AM PhuckFonix Linux - General 8 05-30-2004 10:12 PM

All times are GMT -5. The time now is 04:19 AM.

 Contact Us - Advertising Info - Rules - LQ Merchandise - Donations - Contributing Member - LQ Sitemap -