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.

Filter by
Sorted by
Tagged with
0
votes
0answers
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 ...
0
votes
0answers
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: ...
0
votes
0answers
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 ...
1
vote
0answers
16 views

How can I aggregate the estimates for the rate of decay from different experimental runs?

I have data for a device that dispenses material and I want to use an exponential decay model in python to relate the flow rate to the mass left inside the device, in particular $flow = \beta_0 + \...
1
vote
0answers
39 views

How to properly bin the data for a fit

I am working on a spectroscopy project in which we adjust the wavelength of a laser and get some counts on the detector from some laser-atom interactions. The data that we have is in the form: $(\...
1
vote
0answers
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 ...
2
votes
1answer
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 ...
1
vote
2answers
69 views

Fitting a normal CDF using proportion data

I have the following data (prop is like empirical CDF): ...
0
votes
1answer
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 ...
1
vote
1answer
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 ...
1
vote
1answer
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 ...
0
votes
1answer
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)...
1
vote
0answers
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 ...
0
votes
1answer
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 ...
15
votes
7answers
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 ...
1
vote
0answers
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 ...
1
vote
0answers
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 ...
1
vote
1answer
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 ...
0
votes
0answers
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 ...
3
votes
2answers
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 ...
1
vote
1answer
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 ...
0
votes
0answers
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, ...
2
votes
0answers
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 ...
2
votes
1answer
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 ...
1
vote
0answers
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, <...
1
vote
0answers
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 ...
1
vote
2answers
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 ...
0
votes
0answers
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 ...
2
votes
1answer
45 views

Estimate parameters of a normal knowing the density function

I have a matrix with 3 columns. The first column contains values of a variable $x_1 \in [-1,1]$. The second column contains values of a variable $x_2 \in [-1,1]$. The third column contains a variable $...
2
votes
0answers
41 views

Statistical significance of parameters in nonlinear model

I have historical data for mineral production in a specified region, from 1972 to 2014. I fitted the data to a model following a bell shape, in order to estimate the peak year and production. The ...
1
vote
1answer
41 views

How can I make a Kolmogorov-Smirnov test to check if my data distribution is exponential?

I made a histogram of my data, and the fitting line, but from some reason the fitting line doesn't fit to my graph. How can I make it fit to it? How can I check if my data distribution is exponential?...
2
votes
0answers
12 views

Uncertainty in calibration/curve-fitting parameters

Let me preface with saying I have an idea of a solution, but I am interested in other ones I am interested in the a way to quantify the uncertainty in a calibration/curve-fit parameter. For all ...
0
votes
0answers
29 views

Scaling and Transformation of histograms

Basically I have some histograms of images which I want to scale and transform so that if I apply a single threshold then I would get a constant alarm rate.How can I go about doing this.Below are 2 ...
0
votes
0answers
40 views

Matching a quadratic model to a linear model to give constant false alarm rate

I have a linear model which estimates the false alarm rate on different regions of an image on thresholding. Meaning the rate of false alarms is constant for all regions when a single threshold is ...
3
votes
1answer
48 views

How to fit a set of curves having some free and some shared parameters?

The problem I have a data set with 1 dependent and $N$ independent variables $x_1,\dots ,x_N$ (all real numbers), and need to fit a (nonlinear) function/curve $$ f_i(x_i; p_1,\dots ,p_{k_F}, r_1, \...
1
vote
0answers
23 views

Extend Best Line Fit methodology to a Grid

Sometimes, I'm provided with some data, a list of (x,y) points, and asked to determine a best-fit to some polynomial (or other function) that produces the inputs into the function that when chosen, ...
1
vote
1answer
43 views

How to extrapolate partial curve based on other complete curves?

I heat a room to a certain temperature. Then I let it cool over time. I measure the temperature at 6 intervals as it cools. I repeat this process for some other rooms. From this, I get a set of ...
0
votes
0answers
34 views

How to do curve fitting with data from measurements of experimental replicates (dose-response)?

Attached an image of a scatter plot based on sample data. I have tried searching the web but found only a video by Originlab doing concatenate fit. Tried looking for examples that use SPSS, Magicplot ...
1
vote
1answer
209 views

Get lower bounds and upper bounds of a curve

I have fit the wave data as below using Least Square optimization and used Root Mean square to calculate upper and lower bounds. I wanted to know is there any other alternative exists which gives a ...
0
votes
2answers
664 views

Fitting pmf of a scaled Poisson distribution and Python histogram plotting

I have a nuclei meanlife of $550\mu s$, for which I've taken the frequency(rate) to be $1/meanlife = 1818$. I then sampled randomly from a poisson distribution with that frequency, taking the ...
1
vote
2answers
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 ...
2
votes
0answers
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 ...
3
votes
0answers
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. ...
0
votes
0answers
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 ...
0
votes
1answer
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 ...
0
votes
1answer
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 ...
1
vote
0answers
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 ...
2
votes
0answers
44 views

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

I have a following data-set: ...
0
votes
0answers
58 views

Confidence interval of fit parameter

First of all: I am quite new to statistics, so please don't tear me apart. ;-) I am currently trying to calculate a confidence interval for a fit of a curve to measured data points. I have done this ...
1
vote
1answer
47 views

Fitting a curve or raw transformation in a logistic regression

For my project, I am fitting a logistic regression to the some 'dummy' bank data. The head of the dataset looks like this ...