Top "Curve-fitting" questions

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

Why does scipy.optimize.curve_fit not fit correctly to the data?

I've been trying to fit a function to some data for a while using scipy.optimize.curve_fit but I …

python numpy matplotlib curve-fitting data-fitting
Python and lmfit: How to fit multiple datasets with shared parameters?

I would like to use the lmfit module to fit a function to a variable number of data-sets, with some …

python parameters curve-fitting lmfit
scipy.optimize.curvefit() - array must not contain infs or NaNs

I am trying to fit some data to a curve in Python using scipy.optimize.curve_fit. I am running …

python scipy curve-fitting
Pass tuple as input argument for scipy.optimize.curve_fit

I have the following code: import numpy as np from scipy.optimize import curve_fit def func(x, p): return …

python numpy scipy curve-fitting
How to visualize a nonlinear relationship in a scatter plot

I want to visually explore the relationship between two variables. The functional form of the relationship is not visible in …

python matplotlib curve-fitting statsmodels smoothing
Fit a sigmoid to my data using MATLAB

I have a lot of data, and I think it is possible to fit it to a sigmoid (this thought …

matlab curve-fitting data-fitting
Using scipy.optimize.curve_fit with weights

According to the documentation, the argument sigma can be used to set the weights of the data points in the …

python scipy curve-fitting
Python fit polynomial, power law and exponential from data

I have some data (x and y coordinates) coming from a study and I have to plot them and to …

python regression curve-fitting exponential power-law
gnuplot - Does `set xrange [x_min:x_max]` limit the ranged used for function fit?

Simple question - the range drawn on a plot can be changed with the set xrange [x_min:x_max] …

gnuplot curve-fitting data-fitting xrange function-fitting
Smooth spline representation of an arbitrary contour, f(length) --> x,y

Suppose I have a set of x,y coordinates that mark points along contour. Is there a way that I …

numpy scipy curve-fitting bezier spline