Top "Curve-fitting" questions

Fitting 1-D curve to data points, minimizing pre-defined error/loss function.

How do I fit a sine curve to my data with pylab and numpy?

For a school project I am trying to show that economies follow a relatively sinusoidal growth pattern. Beyond the economics …

python numpy trigonometry curve-fitting economics
Fit a gaussian function

I have a histogram (see below) and I am trying to find the mean and standard deviation along with code …

python matplotlib scipy histogram curve-fitting
Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000

I want to make an logharitmic fit. But I keep getting the a runtime error: Optimal parameters not found: Number …

python scipy curve-fitting
How to fit a gaussian to data in matlab/octave?

I have a set of frequency data with peaks to which I need to fit a Gaussian curve and then …

matlab octave curve-fitting gaussian
Exponential curve fitting in SciPy

I have two NumPy arrays x and y. When I try to fit my data using exponential function and curve_…

python numpy scipy curve-fitting
How to make a curve smoothing in matlab?

the blue plot is a noisy plot of the original plot(red). Is there any way to approximate the blue …

matlab signal-processing curve-fitting
How to calculate the vertex of a parabola given three points

I have three X/Y points that form a parabola. I simply need to calculate what the vertex of the …

curve-fitting
Why does scipy.optimize.curve_fit not fit to the data?

I've been trying to fit an exponential to some data for a while using scipy.optimize.curve_fit but i'm …

python matplotlib scipy curve-fitting data-fitting
What's the error of numpy.polyfit?

I want to use numpy.polyfit for physical calculations, therefore I need the magnitude of the error.

python numpy curve-fitting
How to apply piecewise linear fit in Python?

I am trying to fit piecewise linear fit as shown in fig.1 for a data set This figure was obtained …

python numpy scipy curve-fitting piecewise