LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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

Reply
 
Search this Thread
Old 05-30-2007, 01:38 PM   #1
Telemako
LQ Newbie
 
Registered: Nov 2005
Posts: 4

Rep: Reputation: 0
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
 
Old 05-30-2007, 04:05 PM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,753
Blog Entries: 1

Rep: Reputation: 238Reputation: 238Reputation: 238
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 04:09 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to recover partition table ariadneN Linux - General 3 07-26-2006 03:13 PM
Software to acess and recover data on Fat32 data NeoSpawn Linux - Software 2 09-04-2005 12:37 PM
Recover partition table djib Linux - Software 2 05-14-2005 08:07 AM
Recover the partition table yogeshwar_s Linux - Hardware 1 09-22-2004 03:02 AM
Data Recover Help -> Incorrect Partition Table PhuckFonix Linux - General 8 05-30-2004 11:12 PM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration