
Abstract Algebra Abstract Algebra Math Forum 
 LinkBack  Thread Tools  Display Modes 
November 28th, 2013, 04:01 PM  #1 
Newbie Joined: Nov 2013 Posts: 4 Thanks: 0  Two data sets fitting
Hello, I am unsure if I am in in the right section of this mathematic forum. I searched the web for the whole day for a solution to a problem I am trying to solve, and I can't find an answer or some keywords that would help me to search on a specific topic to solve my problem. My problem is the following : I have two sets of data of the same length. "Set A" and "Set "B". Both have X,Y coordinates. Set A is the input, and Set B is the output. I am trying to find a way to calculate the best "formulas" to convert any value in "Set A" space coordinates, and obtain a value in "Set B" space coordinates. I would like to find something that can take a few samples values and calculate the best "fitting formulas". If I would add more samples, the formulas would just become better. I want to add more than 3 or 4 points because the conversion from "Set A" to "Set B" is not linear. Most of the forums I visited give a solution by writing 3 equations in a matrix, calculating the inverse matrix, and voilą. But this model will not be accurate for my problem. For example, my data could look like this : Set A Set B 0,0 0,0 50, 50 25, 25 100, 100 200, 200 I found many links on least squares fitting, but I am not good enough in mathematics to understand if I can use this for 2D coordinates. All examples I found is able to find an equation that gives Y for any X value. But not a X2,Y2 value for any X1, Y1 value. If someone could provide any help on this topic, I would really appreciate! Simon 
November 28th, 2013, 10:25 PM  #2 
Senior Member Joined: Aug 2011 Posts: 334 Thanks: 8  Re: Two data sets fitting
Sorry, I think that the wording of your question is too ambiguous. Also, the numerical table of the data sets is not clear enough. The names of the rows and columns are not defined. 
November 29th, 2013, 10:09 AM  #3 
Newbie Joined: Nov 2013 Posts: 4 Thanks: 0  Re: Two data sets fitting
Hello. I'm sorry for the clarity of the question. I'll try my best to explain it better in this reply : I have two sets of data. X and Y coordinates in each sets. Let's say it's just a rectangle for simple example : Set A Point 1 : X:0, Y:0 Point 2 : X:1, Y:0 Point 3 : X:0, Y:1 Point 4 : X:1, Y:1 Point 5 : X:0.5, Y: 0.5 Set B Point 1 : X:1000, Y:1000 Point 2 : X:2000, Y:1000 Point 3 : X:1000, Y:2000 Point 4 : X:2000, Y:2000 Point 5 : X:1900, Y:1900 For each point in Set A, there is a corresponding point in Set B at the same index. In this case : Point 1 in Set A : 0,0 is transformed to Point 1 in Set B : 1000, 1000 Point 2 in Set A : 1,0 is transformed to Point 2 in Set B : 2000, 1000 etc. I am trying to find a way to calculate formulas that would transform any X,Y values in the area of Set A and estimate the resulting value in Set B. I have tried Multiple Linear Regression to calculate coefficient for two equations : X[set B] = A*X[set A] + B*Y[set A] + C Y[set B] = A*X[set A] + B*Y[set A] + C It works if my data set is linear. As you can see in my example, it's not linear. 90% of the total area [1000,1000 to 1900,1900] is between point 1 (bottom left) and point 5 (middle). Let's say I add another point : Set A Point 6 : 0.49, 0.49 Set B Point 6 : 1050, 1050 This would change the model a lot. This is why I would like to add maybe 25 points, 100 points or more if necessary to have an accurate model that will give me a good approximate. I have thousands of samples available if it is really necessary. Interpolation could probably be used but I am unsure where to look for algorithms to achieve this. If it is still unclear, I am really sorry, english is not my native language, and I am a newbie in mathematics. I'll try to give more details if it's the case. Thank you! Simon 
November 29th, 2013, 01:24 PM  #4 
Newbie Joined: Nov 2013 Posts: 4 Thanks: 0  Re: Two data sets fitting
After more search, I found what I was looking for. The author work is : // Donald Shepard, // A twodimensional interpolation function for irregularly spaced data, // ACM '68: Proceedings of the 1968 23rd ACM National Conference, // ACM, pages 517524, 1969. Tested it, it works perfectly. Simon 
November 29th, 2013, 09:41 PM  #5 
Newbie Joined: Nov 2013 Posts: 4 Thanks: 0  Re: Two data sets fitting
I just replaced it by Natural Neighbours interpolation as it give a very better result. Might be useful for others. Have a nice day! Simon 

Tags 
data, fitting, sets 
Thread Tools  
Display Modes  

Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Interpolation of larga data sets  godric  Real Analysis  1  August 31st, 2012 05:53 AM 
Combining 2 data sets  Shakarii  Advanced Statistics  1  August 10th, 2012 02:32 AM 
Help on comparing differing sets of data  carter22  Algebra  2  March 1st, 2010 05:49 PM 
simple data fitting problem  dimper129  Linear Algebra  0  October 7th, 2009 07:01 AM 
Comparing multiple data sets with different n values  cboldon  Advanced Statistics  2  April 7th, 2008 03:01 PM 