The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [curve-fitting]

Methods used to fit curves (as in linear or non-linear regression) to data.

452 questions
Filter by
Sorted by
Tagged with
8 views

Bootstrapping logistic fitting from bimodal samples

I'm trying to implement a bootstrap method to obtain confidences intervals of a fitted logistic curve. I've been learning a lot because I'm new to these things, so I ask forgiveness if the question ...
13 views

Too large standard errors of parameters from the covariance matrix when fitting data using curve_fit [on hold]

I have some troubles when try to fit my data using curve_fit. I don't really know where I am wrong: in code or in math. First, I have too large variances which I get from the covariance matrix: ...
21 views

Polynomial curve fitting - unique solution

Let's say I have $$\mathbf{y} = (y_1, ..., y_N)^T \text{ and } \mathbf{X} \in \mathbb{R}^{M\times N}$$. Likewise, I have $\mathbf{y} = \mathbf{X}\mathbf{w}$ where $\mathbf{w} = (w_0, ..., w_M)^T$. I'm ...
16 views

38 views

r - Understand goodness of a fitted curve [duplicate]

I had to find the equation of curve that represent my data. After trying different function, I got a models that seems fitting my data, at least by plotting them. But this is it. I have no idea how to ...
29 views

Confidence limits on a curve fit with algebraically related parameters

I suspect that the required techniques for my question already exist, but I don't know what the correct nomenclature is - if so apologies, and can someone point me at the right resources? I have a ...
69 views

Fitting a normal CDF using proportion data

I have the following data (prop is like empirical CDF): ...
45 views

Finding best fit curve with unknown power

If I was to build a program to estimate the best curve fit of type $a * x^b$ where a and b are the parameters I'm optimizing, what would be my go to methods? I know I can use ordinary least squares ...
38 views

Weighting data based on the errors

I have some data (counts) with a Poisson error associated with them and I want to fit the data. I am trying to weight the data inversely proportional to the errors, such that the data points with high ...
73 views

Extract a significant sample of data from a non-normal distribution before modelling a fitting curve [closed]

Background: In my master thesis I am measuring how many areas(in square meter) are suitable for greening at different building height in an urban area. So I have two variable: Suitable Areas and ...
62 views

Can a relationship between x and y be modeled, if all the data points fill the area under a curve?

I'd like to derive an equation that enables me to calculate y based on x. I'm having troubles figuring out how to do this as my data doesn't form a line/curve, but rather creates an edge (image below)...
37 views

Correct error estimation for linear fit

This may be a simple problem, but I want to be thorough in setting up my problem as I'd like to know why I should proceed in one of two ways (or another if someone thinks it is suitable), so please ...
24 views

What is the difference between machine learning approaches and Fourier series to fit a curve to data graph?

As I know machine learning(at least in some problems) tries to fit a curve to data graph. And I think Fourier transform tried to do it. But machine learning use a hypothesis curve with the formula ...
2k views

What kind of curve (or model) should I fit to my percentage data?

I am trying to create a figure which shows the relationship between viral copies and genome coverage (GCC). This is what my data looks like: At first, I just plotted a linear regression but my ...
39 views

Modelling the heat exchange between a steel cylinder and the surrounding medium [duplicate]

Massively refactoring my question after @user2974951 feedback below. I have a set of measurements (time, temperature) that correspond to a certain physical process. Both time and temperature ...
22 views

Straightforward explanation of Theil inequality statistic for curve fitting

I’ve come across a paper (here) that uses a “Thiel inequality statistic” (pages 9 and 10 of the supplementary information) to determine goodness of fit for a model with its training data. I was ...
72 views

Improve monoexponential curve fitting in the initial portion

I've calculated the Tissue Volume and Tissue Mass from a Computed Tomography image of the lung of a given patient. The y-axis of the attached figure is Volume as a percentage of the total lung ...
70 views

Simulate data for quadratically related variables

I'm looking to simulate a dataset with two variables (X,Y) where the relation between these variables is quadratic (inverted U shape) but not a perfect trend (meaning if Y is regressed onto the terms ...
2k views

Curve fitting when data has a sharp initial slope and then tapers off

I have a dataset that I'm currently smoothing using a 6th order least-squares polynomial which models the initial sharp curve well but as the data tapers out some noise at the end causes a downwards ...
39 views

Constraining parameters in NLS in R to be less than a value, or greater than a different value

The nls function in R comes with upper and lower arguments to specify the upper or lower ...
25 views

Nonlinear fit in R only works with tightly restricting parameter bounds [duplicate]

I have a reproducible example here with an attempt to use nls to fit a nonlinear function: y = ax/(b+x) + c Even when I set the starting values to be a good, ...
27 views

Detecting outliers in time series with fitting curve

I have a collection of time series that I know follow a particular type of non-linear functions. For each time series I use the LM algorithm to obtain a fitting curve. I have already checked that the ...
37 views

Function to fit acid reaction curve

Data in the image below shows a variable DME reacting to the increase in acid concentration. It looks like it has a very fast increase from when the concentration is raised from 0 to 0.5 and then a ...
41 views

Error while curve fitting in R [closed]

I need to fit the curve y = K + B*exp{ a*(log x) + b*(log x)^2 + c*(log x)^3 }. Where a, b, c, K, B are unknown parameters. I just have 5 data points which are, <...
22 views

how to select training and testing data for interpolation in 100 instances data?

I would like to divide my data of only 100 instances into training and testing an use the training data to fit a curve(interpolate) and use the testing data to calculate the error at the interpolated ...
155 views

R-Squared for a non linear curve

At the start, please forgive me if my question is too elementary. I am fitting a non-linear curve. Say a parabola. The data points I have are close to a parabola and the best output I get is a ...
25 views

Scale and Translate a parabola to a golden distribution(which is also parabolic)

I have multiple image histograms(difference images) whose distribution is parabolic.I use least squares to do a quadratic fit .The questions is how do I scale and translate this parabola to a golden ...
45 views

82 views

Fitting curve to non-decreasing data

I have the below data. I want to fit a non-decreasing curve for this data. But, althouhg its grağh seems so regular, I couldn't find a suitable form of function. What kind of function may be suitable ...
29 views

Working out a metric for the goodness of fit for 2D data in time

I have a dataset which I wish to optimise a fit for. The data might look something like I.e. orange is t=0, blue is t=1, and green is t=2. I wish to find a fit. I have a differential equation ...
46 views

what is the best model that can be fitted onto a retention curve

I have a retention curve from activity data from customers which trends from 100% on day 1 down towards 0% over team in a curve. I need to fit a model to extrapolate this data past what data I have. ...
57 views

Covariances and correlations in curve fitting

I have a set of data that I am trying to curve fit and I'm ultimately interested in the errors on my fit coefficients. I take my errors on each fit coefficient as the on-diagonal elements of the ...
45 views

Approximate the data to a single curve

The question might be simple, but I am not able to find the answer. Hence I am asking here. I did search google but didn't get an answer. I have a continuous stream of data coming from an API in the ...
55 views

Regression for curve fitting

For a curve generated from dataset points, split the curve into parts and obtain the best-fit degree of polynomial,coeffcients and the interval/range of the split through implementation in python.I am ...
21 views

Area under the curve in smaller and uniform intervals?

I have 5 million individuals falling into 30 odd intervals, something like the below: 0: 9000 1-49: 8525 50-99: 7593 100-199: 7385 200-299: 4242 ... I would like to approximate the number of ...
44 views

R - How can I fit the following data and get the equation describing them? [closed]

I have a following data-set: ...