Questions tagged [curve-fitting]
The curve-fitting tag has no usage guidance.
37
questions
1
vote
0answers
18 views
Fitting a multivariate PDE (using Java)
I'm doing simulations of 2 coupled PDE's with Comsol Multiphysics. I want to fit some data (using the Application method, whose language is Java) to those simulations.
In order to answer my question ...
1
vote
0answers
12 views
Error on the fit parameters when several good fits exist
I am using the reduced chi-squared statistic to determine the goodness of fit. I run several simulations and determine that a parameter 'p' has a certain range of values that all give values between 0....
1
vote
1answer
72 views
What is a good library in Python for correlated fits in both the $x$ and $y$ data?
I have $x$ and $y$ data, both of which have their own covariance matrices. scipy.optimize.curve_fit will accept a covariance matrix for the $y$ data, called ...
0
votes
0answers
28 views
Fit exponential convergence
I'm working with a numerical algorithm whose output $y$ asymptotically approaches a certain unknown value $a$.
I expect an exponential convergence, i.e. the data $y$ given by my algorithm should be ...
1
vote
2answers
67 views
identifying peaks in data
I have data with peaks on some background, for example:
The two prominent peaks at ~390 and ~450, as well as the much smaller peak at ~840. What are some options to programmatically find the position ...
2
votes
1answer
70 views
How to check experimental data against a theoretical curve? (Python)
I am trying to check the agreement of a dataset against a theoretical curve, specifically a bandstop filter in an RLC circuit.
I have generated a function which describes the curve we expect from the ...
0
votes
1answer
64 views
Gnuplot: How can I determine the maxima of a fit function in gnuplot?
I have a set of data data.txt which can be fit to a Gaussian function, f(x). I want to determine the coordinates of the point of ...
1
vote
1answer
105 views
Gnuplot: How can I fit a range of points (out of the entire data) to a function?
I have a set of data obtained for the I-V characteristics of an LED.
...
2
votes
2answers
111 views
What equation should I fit this set of data points to?
I have done an experiment Estimation of silver nitrate by potentiometric titration with standard KCl solution.
A plot of $\dfrac{\Delta E}{\Delta V}$ versus Volume of KCl solution gives the ...
0
votes
1answer
1k views
Numpy.polyfit with regularization
I am trying to use the numpy polyfit method to add regularization to my solution.
My non-regularized solution is
...
0
votes
2answers
55 views
Finding parameters numerically
I suspect that a function $f(x,y)$ is of the form $f(x,y)=a(bx+c)^{dy+e}$. I have access to several values of $f(x,y)$. How do I proceed numerically to find the parameters $\{a,b,c,d,e\}$?
By ...
1
vote
0answers
47 views
Fit constant term in LM algorithm
I'm using the Levenberg-Marquardt algorithm to fit my data with a Gaussian function:
$$
f(x)=a\cdot e^{-\frac{(x-c)^2}{2\sigma^2}}+f_0
$$
$a$, $c$, $\sigma$ and $f_0$ are the fitting parameters. The ...
1
vote
1answer
128 views
Least square with rectangular function
I have the function $c(t) = A \cdot \cos \left(\dfrac{2\pi}{\tau} \cdot t + \phi \right) $
which is used to define
$ T(t) =
\begin{cases}
M + c(t), & c(t) > 0 \\
M, &c(t) \leq 0.
\end{...
12
votes
3answers
530 views
Fitting Implicit Surfaces to Oriented Point Sets
I have a question regarding quadric fit to a set of points and corresponding normals (or equivalently, tangents). Fitting quadric surfaces to point data is well explored. Some works are as follows:
...
1
vote
1answer
370 views
matlab lsqcurvefit parameter estimation journey
The lsqcurvefit solution in matlab converges at different solutions depending upon the initial guess:
Surface represents the error (SSE) between model and data at various combinations of parameters ...
3
votes
2answers
174 views
Optimization of known function with respect to two unknown function arguments
I have a data set, composed of points $(x_i, y_i)$ for $i=1,N$. I also have a known function $F$, which maps these points $x_i$ to $y_i$ as such $F(x_i, a(x_i),b(x_i)) = y_i$, where $a(x_i)$ and $b(...
0
votes
3answers
139 views
Choice of solver/software for global optimisation of cheap black-box function with known derivatives
I am trying to estimate a few unknown parameters of my continuous non-linear PDAE model (simulated through finite-volume method spatial discretisation, and time-stepping through method-of-lines). I am ...
2
votes
3answers
1k views
Fit best polygon to a discrete contour
I have a discrete contour represented by a set of points. The contour looks like a polygon but if you zoom you see that the edges are rugged (that's because it was obtained while working on a finite ...
4
votes
1answer
85 views
Post-processing the noisy results of numerical simulation
I have the following curve, which is calculated on a large number of points and shows smooth behaviour when viewed from distance.
However, the derivative (shown below) exhibits artificial ...
1
vote
2answers
117 views
Finding an enclosing parabola for a set of points
I am looking for an algorithm that fits a parabola to a set of data points. However, no data point may be below the parabola. All points must be above the parabola. Is there an standard algorithm for ...
1
vote
1answer
662 views
Curve fitting for oscillating data
This is my first question. I have the following data that I'd like to approximate as a parametric function:
\begin{align}
y = a + (bx_1 + cx_2 + dx_3 + ex_1x_2 + fx_1x_3 + gx_2x_3 + hx_1x_2x_3 + i)*(...
5
votes
3answers
807 views
Fitting with a linear combination of exponentials
I want to elaborate on a statement I read in Acton's "Numerical methods that work", paragraph "Exponential fitting", page 252.
Computationally we are being asked to fit only the parameters $A$ and $...
2
votes
1answer
426 views
Pseudo Code for non linear power function fit needed
I am struggling finding pseudo Code for a non-linear fit of the following function:
$y = a\, x^b$
Package NLS in R does perform well, but utilizing external software is not practicable in my program ...
1
vote
1answer
112 views
Fit curve with rectangles
I have a one-dimensional set of points, i.e. $(n,y_n), 1\leq n \leq N$. I want to fit them with a linear combination of $k$ rectangular functions in a least-squared-error sense. Each rectangle is ...
4
votes
1answer
181 views
Question on speed and accuracy comparisons of different 2D curve fitting methods
This may be a trivial question, and I apologize if so. Consider the following simple problem: We have a 2D, regular grid of points (say $X = [0,5000] \times [0,5000]$) spaced uniformly by units of 1 (...
6
votes
1answer
293 views
Problems Implementing the Remez Algorithm
So first off:
*** This code is not being used in production software.
It is a personal project of mine, trying to understand
approximation theory and advanced curve fitting.
In other words, I'm ...
2
votes
0answers
48 views
Inverted value is not consistent with expectation
We have a group of observations
$$y = f(x_1, x_2, x_3) \enspace .$$
We have also a forward model $y = f(x_1, x_2)$. The forward model does not include $x_3$ because $x_3$ might include dozens of ...
0
votes
0answers
136 views
1D fit on a surface in matlab
I have a problem fitting a $N\times N$ ($32\times 32$ in this case) matrix in Matlab.
Here is the deal
I have this image, and I want to create 1 dimensional fit between the points and then be able ...
1
vote
1answer
244 views
Curve Fitting problem MATLAB
I have a system of differential equations with some unknown parameters and I need to find the optimal parameter set that fits best with the data I have.
For each parameter set choice (using for loops)...
0
votes
1answer
505 views
Power series regression linear fit in VBA excel
I wrote a program that calculates the best fit in VBA excel for the following model
$$
y_k=c_1x_k+c_0+c_{-1}(x_k)^{-1}
$$
solving for the best fit parameters $c_1$, $c_0$, and $c_{-1}$. However I ...
1
vote
0answers
107 views
How to curve fit an unknown function?
I have data which can be described by $y=f(x,z)$ where $z$ varies from 170 ~ 154. Now values given by $ks$ are known sample values that equals value given in the table header, $uks$ are unknown ...
1
vote
1answer
202 views
Conceptual question about fitting of scattered data
What are the problems that arise when fitting (2D or 3D) a set of scattered data? (non uniformly distributed)
I had some data I had to fit and I solved the problem using the ...
1
vote
0answers
2k views
Piecewise linear approximation of an experimental data curve. Knots position constrained
I need to fit a curve, obtained from experimental data, with a piecewise linear model (4 knots and therefore 3 lines).
I tried using the MATLAB function
...
2
votes
1answer
224 views
How to connect two fitted B-spline curve?
I use B-spline curve fitting to obtain one smooth curve. If I obtain two smooth B-spline , how can I connect then smoothly. For example, I have 59 points((x0,y0,z0),...,(x58, y58, z58)) and I have two ...
0
votes
1answer
358 views
Number of control points for B-spline curve
I am trying to use B spline curve fitting. The order of B-spline curve is 4. When I have many control points, it works well.
However if the number of control points is small such as two, my program ...
2
votes
0answers
138 views
Produce one smooth curve on one triangle mesh
I hope to get one smooth curve on one triangle mesh. I get one path on the mesh at first. The path consists of vertices of the mesh. I can see the path from the image below.
Each one green dot ...
4
votes
1answer
81 views
Finding self-similar solutions
Is there a general approach to finding self-similar solutions; i.e. collapsing several functions onto a single function by some transformation?
I have data from some experiments, and the functions ...