Find Fitting Function for Plot Without Data Points

  • Context: Graduate 
  • Thread starter Thread starter Dathascome
  • Start date Start date
  • Tags Tags
    Fitting Function
Click For Summary
SUMMARY

The discussion centers on finding a fitting function for a plot without known data points, specifically for a function f(x,y) that represents curves with varying energy injections over time. The recommended approach is to utilize a "least squares" fitting method to approximate the curves, determining whether a polynomial, quadratic, or cubic function is appropriate based on visual analysis. The user is encouraged to start with a functional form that resembles the observed curves, such as arctan or polynomial functions, and to adjust parameters accordingly for better fitting.

PREREQUISITES
  • Understanding of least squares fitting techniques
  • Familiarity with polynomial functions and their properties
  • Basic knowledge of interpolation methods
  • Experience with numerical integration concepts
NEXT STEPS
  • Research "least squares fitting" methods in Python using libraries like NumPy or SciPy
  • Explore polynomial regression techniques and their applications
  • Learn about interpolation methods, particularly spline interpolation
  • Investigate numerical integration techniques for complex functions
USEFUL FOR

This discussion is beneficial for data scientists, researchers, and engineers who need to model and analyze curves from graphical representations without direct data points, particularly in fields involving physics or engineering where energy dynamics are studied.

Dathascome
Messages
55
Reaction score
0
Hi there,
This might be a sort of vague question, but if I have a plot say that I don't know the data points for, how can I go about trying to find a fitting function (basically a functional form) for the curves I'm looking at?
Basically I have a figure I got from a journal paper that I want to parameterize with two variables of interest, come up with some sort of functional form for it whose parameters I can tune to change what the curve looks like and then put this into some code that I have.

I'm not really sure where to start with this. I know that there fitting procedure I can use if I have a guess at the functional form but maybe want to tweak the exponents or coefficients say, but I'm not really sure if this applies in this situation.

Sorry if this is to general and vague.

Thanks much.
 
Mathematics news on Phys.org
It's not clear what you want. If you want a function that is close to the given points, then a "least squares" solution is the best to use. You will need to decide, from the given points, if least squares plane, or quadratic, or cubic, etc. is what you need. If you want a function that passes exactly through the points, then you will need an n-1 power polynomial in both parameters. That, typically, is far more complicated than a least squares approximation.
 
I think part of the reason that it's not so clear what I'm trying to do is that I'm not 100% sure what I need to be doing and I'm trying to figure that out.

Here's the figure (since I got it from a journal article I thought it best to leave it unlabled).

screen-capture.jpg


The solid line is say f(x,y=const). At some specific x I change y to some other value and get the dashed line and at the same x if i change y to another value I get the dotted line. At some different x I change y again and get the thin solid line. Basically x is time and y is energy. The solid line is no extra energy injected, dashed and dotted lines are differing amounts of energy injected at the same time, and the thin line is injecting energy at a different time.

I know the amounts of energy injected and at what times but I want to come up with some sort of functional form for f(x,y) where I can basically tweak x and or y and sort of cycle between the curves.

From the paper that contained this figure I know that f(x,y) is some complicated function that was numerically integrated.

Does that make more sense that what I initially said?

I've been reading a bit about interpolation and least squares fitting which sound promising but I'm not totally sure this is what I'm looking to do.

If I'm understanding them right, I need to have some function in mind that the ones I'm looking at could fit to and then do the least squares say and see how well it does fit? The curves look vaguely arctan-esque to me, so would I start with that or would I want to try to fit it to some polynomial?

Sorry if this is still confusing, it is to me to :smile:
Thanks much for the help.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 19 ·
Replies
19
Views
7K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 4 ·
Replies
4
Views
6K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 28 ·
Replies
28
Views
3K