Help finding a polynomial function given a set of data

Click For Summary

Homework Help Overview

The original poster presents a problem involving a set of data with x and y coordinates representing width and length, and a z coordinate indicating power density. They seek assistance in finding a polynomial function for z in terms of x and y, considering the data points available.

Discussion Character

  • Exploratory, Conceptual clarification, Problem interpretation

Approaches and Questions Raised

  • Some participants suggest that fitting a high-degree polynomial may lead to overfitting and question the appropriateness of such an approach. Others propose using a priori expectations to create a model based on physical phenomena. There are mentions of alternative methods like bivariate splines and specific techniques such as the quadratic Shepard's method.

Discussion Status

The discussion is ongoing, with participants providing various perspectives on modeling approaches. Some guidance has been offered regarding the potential pitfalls of high-degree polynomial fitting and alternative methods to consider. The original poster has indicated progress in exporting data for further analysis.

Contextual Notes

There is mention of a significant number of data points, and the original poster notes that the width data points outnumber the length data points. The accuracy of the experimental data is also highlighted, prompting questions about the measuring devices used.

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: 450
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   Reactions: 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
3K
  • · Replies 17 ·
Replies
17
Views
4K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K