Help finding a polynomial function given a set of data

Click For Summary
The discussion revolves around finding a polynomial function for power density (z) based on given x (width) and y (length) coordinates. The user has a substantial dataset but is concerned about overfitting a high-degree polynomial due to the number of data points. Suggestions include using a priori expectations to create a more realistic model with fewer parameters, rather than fitting a 72-degree polynomial. Bivariate splines, particularly the quadratic Shepard's method, are recommended as alternative approaches. The user successfully exported data for interpolation in third-party software, indicating progress in their modeling efforts.
saybrook1
Messages
101
Reaction score
4

Homework Statement


Hello guys, I have a set of data containing x and y coordinates(width and length) as well as a 'z' coordinate that represents power density at each point of x and y given. I was hoping that someone might be able to help me figure out a way that I can find a function for z in terms of x and y given all of the data points. Perhaps MATLAB or mathematica has a way of doing it, although I have not found it yet. I will include a snapshot of some of the data although it is extensive. Also, the number of width data points are larger than the number of length data points if that makes a difference. Thank you very much

Homework Equations


Polynomial function for z in terms of x and y given the data[/B]

The Attempt at a Solution


Looked around the web for quite some time on how to figure this out without brute force and couldn't find any solid answers.
 

Attachments

  • fit to z.png
    fit to z.png
    42 KB · Views: 437
Physics news on Phys.org
You have 72 data points. It's trivial to fit a 72-degree polynomial to that, but that's very unlikely to be realistic, and may behave badly in interpolation and extrapolation.

What is usually done is to use one's a priori expectations of the relationships between x, y and z to create a model, which is an equation that gives z in terms of y and z, together with a number of unknown parameters, in a way that has some intuitive basis in the underlying physical phenomena. Having guessed a model, the data can then be used to estimate the parameters based on an approach of minimising residuals.
The polynomial approach has 72 unknown parameters, which leads to a grossly overfitted curve. Typically, one would only want a few parameters to estimate - say two to six.

What is the physical context? That should suggest a promising model.
 
Congratulations! I have never seen such precise experimental data. :oldbiggrin:

If you drew the graph of the points, but don't trouble to be more than two-place accurate, you and we might have an idea what degree of polynomial it would make sense to try and fit them to.
 
I wouldn't think you would want a polynomial fit. Not particularly my field, but I would suggest you look at bivariate splines. The quadratic Shepard's method is one that comes to mind. Lots of info on the internet. Look up QSHEP2D.
 
Hey guys, I apologize for taking so long to respond and I really appreciate your responses. There are actually many many more data points than in the sample that I posted. I ended up being able to export the data from excel and interpolate/apply it to my model in third party software. Thanks again for your help!
 
Could you show us any result?
 
  • Like
Likes andrewkirk
epenguin said:
Could you show us any result?
Let me get back to you on that! Feel free to remind me or pm if I forget.
 
saybrook1 said:
Let me get back to you on that! Feel free to remind me or pm if I forget.

As said by "epenguin", you are to be congratulated for the accuracy of the experimental data. Your length and width measurements are accurate to within a small fraction of the diameter of a hydrogen atom. What sort of measuring device did you use?
 
Ray Vickson said:
As said by "epenguin", you are to be congratulated for the accuracy of the experimental data. Your length and width measurements are accurate to within a small fraction of the diameter of a hydrogen atom. What sort of measuring device did you use?
Thank you, the results are however not mine; I am using the data to help model something.
 
  • #10
I guess you cannot send a pm on these forums.
 
  • #11
saybrook1 said:
I guess you cannot send a pm on these forums.
You can, but they're called Conversations here rather than PM.
To do one, hover your mouse over INBOX on the top menu. In the pop-up menu that appears, a 'Start a New Conversation' link is in the bottom right corner.
 
  • #12
andrewkirk said:
You can, but they're called Conversations here rather than PM.
To do one, hover your mouse over INBOX on the top menu. In the pop-up menu that appears, a 'Start a New Conversation' link is in the bottom right corner.
Ahh okay, thank you very much.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
Replies
8
Views
2K
Replies
6
Views
1K
  • · Replies 9 ·
Replies
9
Views
2K
Replies
9
Views
2K
  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 8 ·
Replies
8
Views
2K