December 7th, 2014, 11:50 AM  #1 
Newbie Joined: Aug 2012 Posts: 17 Thanks: 0  What is the best fit for this data
Hi I have one data set and I am looking for a function that could fit my data well. Preferably I am looking for something I can reproduce in excel and solve with solver. The function can have multiple constants, but not too many. It can also have IFs or whatever. I am looking for the best possible fit and I am also looking for any limits (n>inf) on said function. I tried what I could but I could not get a good fit. My data can be found here: https://dl.dropboxusercontent.com/u/.../data_long.csv There's also a shorter and more accurate but less complete version, here: https://dl.dropboxusercontent.com/u/...data_short.csv In the later data set every row that is not included would have the value of the row that has the largest row number of all rows that are less than the one in question. So for example: GEN;FIT 56;0,064144345 127;0,06656979 Would mean that GEN 57 through 126 would have the value of 0,064144345 Any help would be much appreciated 
December 8th, 2014, 05:09 AM  #2 
Newbie Joined: Aug 2012 Posts: 17 Thanks: 0 
I made a graph with the data: 
December 8th, 2014, 06:02 AM  #3 
Senior Member Joined: Apr 2014 From: Glasgow Posts: 2,087 Thanks: 700 Math Focus: Physics, mathematical modelling, numerical and computational solutions 
Can you try plotting it on a log scale? It seems like there's lots of exponential decays sort of stuck together.

December 8th, 2014, 01:06 PM  #4 
Newbie Joined: Aug 2012 Posts: 17 Thanks: 0 
Sure: I used this data for the graph. I duplicated every value so that it would be more faithful to the original dataset: https://dl.dropboxusercontent.com/u/..._data_full.csv 
December 8th, 2014, 01:45 PM  #5 
Math Team Joined: May 2013 From: The Astral plane Posts: 1,668 Thanks: 657 Math Focus: Wibbly wobbly timeywimey stuff. 
It looks a bit like this. Dan 
December 8th, 2014, 09:27 PM  #6  
Senior Member Joined: Jan 2012 From: Erewhon Posts: 245 Thanks: 112  Quote:
Failing that a low order PadÃ© approximation should produce a very good fit, but I would not recommend this procedure. You need some theoretical or heuristic basis for the fitting function. CB Last edited by CaptainBlack; December 8th, 2014 at 09:29 PM.  
December 9th, 2014, 12:45 AM  #7 
Newbie Joined: Aug 2012 Posts: 17 Thanks: 0 
This is the result of an algorithm running for 10 hours. The algorithm starts with a square polygon and randomly adds and takes away points. The new polygon is tested than to see if it is more round (more like a circle) than the previous one was. If it is better, than the new polygon is kept, if not than it will be thrown out and the old one will be used again. The horizontal lines exist because sometimes no new points are found for a while. Also these lines will keep growing longer and longer since the more the polygon is round the less likely a new point can be integrated into it. Here is the algorithm written in (node)js: https://dl.dropboxusercontent.com/u/...node_script.js Hope this helps 
December 9th, 2014, 09:00 AM  #8  
Senior Member Joined: Jan 2012 From: Erewhon Posts: 245 Thanks: 112  Quote:
$$ Fit(n)=\frac{1+\alpha n}{\beta + \gamma n} $$ or maybe: $$ Fit(n)=\frac{1+\alpha \log(n)}{\beta + \gamma \log(n)} $$ and only go for something of higher order if the fit is inadequate. CB Last edited by CaptainBlack; December 9th, 2014 at 09:11 AM.  
December 10th, 2014, 02:36 AM  #9 
Newbie Joined: Aug 2012 Posts: 17 Thanks: 0 
I'v gotten a 74% fit with the later function over 80% if I change the 1 into a constant. So where would I go from here? I tried a few things but I had little to no luck. It seems there is a periodic element to the data that is missing from the function but I'm not sure how I could add one to the it. 

Tags 
data, excel, fit, function 
Thread Tools  
Display Modes  

Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Data Analysis  DataGeek  Real Analysis  1  January 25th, 2013 04:04 PM 
Rolling 3 months YOY data to Monthly YOY data  lumpa  Real Analysis  0  October 19th, 2012 09:07 AM 
FFT on sample data  ramyy  Applied Math  1  June 29th, 2009 05:49 PM 
How to regress actual data towards projected data.  BigLRIP  Advanced Statistics  1  May 18th, 2009 11:01 AM 
A Data Problem  EddSjd  Algebra  2  September 8th, 2007 11:06 AM 