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
0 answers
10 views

Power-law fitting with x-y relationship [closed]

I would like to fit a power-law distribution to data taking into account the x-y-relationship. I tried plfit & powerlaw package for python. But the problem with them is that if I shuffle the y-...
Philipo's user avatar
0 votes
0 answers
8 views

Time Series Prediction for Variable-Length Input with Fixed Sampling Period

I'm working on a time series prediction task where I need to predict the parameters (amp, phase, freq, offset) that best fit a variable-length input series. The samples are always at the same period. ...
Andrea Arlotta's user avatar
3 votes
3 answers
77 views

How to visualize trends

I am working on a paper where we plotted BMI trends as a function of age in the population. We plotted trends for six databases, then we plotted for each sex, then for race, in three categories. I ...
Stefano Staurini's user avatar
1 vote
0 answers
34 views

How can I fit my experimental curve using this equation using python? [closed]

The equation is $ Y = \left(a*\arctan\left(\frac{x \pm b}{b} * c\right)\right) + d x $ I tried fitting using scipy.optimize but could not include $\pm$ Here $ a , b,...
Dipankar Pokhrel's user avatar
1 vote
1 answer
53 views

Knots selection testing for Natural Cubic Splines model in R

I have a dataset of Japan's Mortality rate and want to fit a natural cubic spline to this mortality data. The choice of knots are subjectively chosen at 10, 20, 30,...,90. I want to know whether or ...
JaFranke's user avatar
1 vote
0 answers
19 views

Need guidance to fit logistic distributions to compare performances in multiple events

Ok, here's the thing. I'm trying to compare performances in different running events (i.e. all registered performances in each event from 1990 to 2023), to estimate equivalent performances. After ...
Daniel Westergren's user avatar
0 votes
0 answers
25 views

How to know errorbars on accuracy to nonlinear fit: $A(1-\cos(x+\phi))$ with poisson noise?

I am trying to write some code that accurately estimates the parameters for the following function: $$ Y = A(1-V \cos(X+\phi)) $$, where this output data is poisson distributed. To do this, I first ...
Steven Sagona's user avatar
0 votes
1 answer
19 views

Is it possible to have an Indicator-spesific Trait factor model within a multiple indicator second order growth model?

I am running a multiple-indicator growth curve model over 7 time points. One of my items has a large residual variance and seems to covary very well among themselves. Thus, I assumed that it has a ...
EmH's user avatar
  • 25
0 votes
0 answers
13 views

Cubic spline with circular predictor [duplicate]

I have a set of observations $y_i$ for a set of values of the independent variable $x_i$. $x_i$ takes values of angles, so it is a circular variable. Is there some method to perform cubic splines or ...
dherrera's user avatar
  • 1,083
1 vote
0 answers
19 views

Invariance coding for running a latent growth model running under partial (scalar or metric) invariance

I am running a second-order latent growth curve with 7 time points. The model has a four indicator latent variables at the measurement level so I ran a longitudinal invariance test. The model holds ...
EmH's user avatar
  • 25
0 votes
0 answers
89 views

Curve fitting: Scaling the sigmas so that the reduced chi-squared statistic = 1. Is this a good heuristic?

In the official documentation for the python function scipy.optimize.curve_fit, the following description is given for a boolean-typed parameter absolute_sigma. If False (default), only the relative ...
Moca Aoba's user avatar
  • 101
1 vote
1 answer
32 views

Double exponential decay with values going below the start point of the fitted curve

I have a small dataset with 5 points where x values are log(time) and y = obs. It is known that the behavior is an exponential increase for the first and second (x,y) values and then decreases ...
MaterialSci's user avatar
4 votes
1 answer
215 views

Uncertainty of the area of a Gaussian curve atop a linear background

I have some data from a counting-based spectroscopy experiment. Each data point is an (Energy, Rate) pair. One such data set looks like this: I choose to fit this data to a Gaussian curve plus a ...
BohemianTapestry's user avatar
0 votes
0 answers
28 views

Non-Linear data fitting for kinetic data

I am trying to fit a two_site model which I derived, (basically, rate as a function of pressures of reactants and products) to my experimental data. Just want to check if the logic below is fine, ...
Suyash Sachin Damir's user avatar
1 vote
2 answers
48 views

Help with (what should be?) a simple exponential curve [closed]

I'm admittedly not a math expert. I'm in the process of reverse engineering a piece of software and am stuck on finding a curve. The curve is used to convert a value (0-1) into a real world value. The ...
John Conrad's user avatar
1 vote
0 answers
75 views

How to find the curvature of a noisy function with few evaluations?

I'm working on a project in computational solid state physics where I have to find the curvature of a smooth function $f \ : [0,\infty] \rightarrow \mathbb{R}$ around the minimum point $x_0 = 0$. The ...
Jakob KS's user avatar
  • 111
0 votes
0 answers
43 views

Learning Curve on two classifiers

I am using a logistic regression classifier and Gridsearch to optimize negative log loss. After generating its learning curve to test for overfitting/underfitting, my model seems to return this ...
user54565's user avatar
1 vote
0 answers
16 views

Optimizing Constants in a Function with a Square Root Term

I am working on a curve fitting problem where I have a series of real data points, and I want to fit a curve to this data. The derivative of the function I am trying to fit has the form: f'(x) = -sqrt(...
Ahmet Ercan Batirel's user avatar
0 votes
0 answers
16 views

Regression with random vs uniform distribution of a covariate

Suppose we have some population of individuals, each having X and Y variable. I know that in the population, most individuals have low values of X, but I want to find regression formula for low as ...
sitems's user avatar
  • 3,849
0 votes
0 answers
14 views

Best interpolation technique for ODE-data

Let's assume we have an ODE $\dot{x}=F(x)$ where $F: \mathbb{R}^n \rightarrow \mathbb{R}^n$ is a vector field. And we observe a trajectory $\gamma: [t_0,t_1] \rightarrow \mathbb{R}^n$ from this ODE ...
NicAG's user avatar
  • 171
0 votes
1 answer
22 views

Consequences for not estimating autocorrelated residuals in a growth curve model

I am fitting a second order growth model with 7 time points on Mplus. When I estimate the model with autocorrelated residuals in it the model will not run because of identification issues. (when I ...
EmH's user avatar
  • 25
0 votes
0 answers
31 views

Logistic regression assessing the fit of variables

In a logistic regression with multiple independent variables what are some approaches to assess how well the model fits against the continuous variables in the model? I have a model with multiple ...
Nuboso's user avatar
  • 23
0 votes
0 answers
32 views

How to model breakage events for electronic devices using a Weibull distribution?

I got age data (in years) of gas heatings from a random sample of about N=700 participants. So participants were asked how old their gas heating is in years. Now I like to model that age distribution (...
Dirk's user avatar
  • 3
1 vote
0 answers
76 views

Test of good fitting on a sigmoid [closed]

as you can see on the figure i linked i am currently fitting my data (which looks like a sigmoid) using a function i defined with 5 parameters. ...
luigi123456's user avatar
0 votes
1 answer
60 views

Conditional Expectation of Multivariate Normal

I'm trying to calculate a good mean shrinkage parameter for a custom quadratic discriminant analysis (QDA), and I ran into a math problem. Suppose $X=(X_1, X_2, \ldots, X_k)^T\sim{\mathcal{N}(\textbf{...
Charles0349's user avatar
0 votes
1 answer
53 views

Estimating a censored distribution curve

I have a sample of only 142 numbers from a distribution of 3852 numbers ranging from 0 to 53, but it is censored below 35 (The values ​​exist, but I don't have access.), so I have only the values in ...
Silvio Duarte's user avatar
1 vote
0 answers
230 views

How to fit data with asymmetric error bars?

General question: How do I fit a model to data when the data points have asymmetric error bars? What is the cost function I use to calculate residuals, and from that, how do I calculate confidence ...
Jagerber48's user avatar
1 vote
0 answers
43 views

How to calculate heteroskedastic standard errors

I'm doing curve fitting, but my error is non-stationary. The variance decreases: I'm looking for a signal in the noise (In this case at x=90, y=50). I'd like to calculate the "standard error&...
Tom Huntington's user avatar
0 votes
0 answers
7 views

Testing the goodness of fit of a Zipf distribution [duplicate]

I have several ranking distributions and would, for each one, like to fit a [Zipf distribution][1], and estimate the goodness of fit relative to some standard benchmark. With the Matlab code below, I ...
z8080's user avatar
  • 2,120
1 vote
1 answer
126 views

Testing goodness of fit for a Zipf distribution (in Matlab)

I have several ranking distributions and would, for each one, like to fit a [Zipf distribution][1], and estimate the goodness of fit relative to some standard benchmark. With the Matlab code below, I ...
z8080's user avatar
  • 2,120
1 vote
0 answers
68 views

Fitting data taking into account for the spread in data, which are zero for some data points

I'm trying to use scipy to fit a $\tanh$ function to some data. The data is of the form $(x_i, y_i)$ for $i=1,\cdots,N$, where $0\leq y_i \leq 1$. I choose $x_i$ to be linearly spaced, such that $x_0=...
sodiumnitrate's user avatar
0 votes
1 answer
114 views

Fitting a power law model with an additional linear term

A model of the form $y=a\cdot x^b$ can be linearly fitted by taking logs on both sides - giving $\ln(y)=\ln(a)+b\cdot\ln(x)$, where $\ln(y)$ is regressed against $\ln(x)$. This is a standard textbook ...
des224's user avatar
  • 1
0 votes
0 answers
55 views

Statistcially assessing how similar curves are?

I have intensity curves (~9 reps) of bacterial fluorescence over 2.2 cm from 4 groups (A, B, C and D unknown) and three treatments (10 mM, 1 mM and 0 mM). My current code is below. I wish to show how ...
Cameron William Michael Murphy's user avatar
0 votes
1 answer
36 views

Is it possible to use some form of curve identifcation algorithm or model in R to identify a curve based on data from three different treatments?

I was wondering if it is possible to train a model or algorithmn to identify a curve shape based on experimental data. Say we have 3 treatments 0 mM sugar, 1 mM sugar and 10 mM sugar and three ...
Cameron William Michael Murphy's user avatar
0 votes
0 answers
122 views

How to plot a learning curve for 10-fold cross validation?

I am working on a dataset. I built several models using 10-fold cross validation (not a train-test split). Now, I want to plot a learning curve for each model to show if it is overfitting, ...
Muneera's user avatar
  • 11
0 votes
0 answers
33 views

Latent growth curve models (SEM): determining the shape of curve with unconditional time-varying covariates

I have a question about determining the shape of a curve (linear vs. quadratic) in latent growth curve models within a structural equation model framework. If you are including time-varying covariates ...
Aepkr's user avatar
  • 177
2 votes
1 answer
66 views

How to find the linearity of 5 points

I am currently developing a software in C. I have an array (matrix) that contains some coordinate points like this (125 points for now): \begin{bmatrix}x1&x2&x3&x4&x5&...&x125\\...
nomad's user avatar
  • 23
0 votes
0 answers
55 views

How to evaluate whether peaks extracted from time-series are approximately Gaussian shaped?

I am analysing environmental time-series of the pollutant concentration that is measured every 3 seconds. From these time-series I'm extracting peaks (i.e. the signal of the pollutant concentration ...
Misterrik's user avatar
2 votes
0 answers
46 views

Measure of goodness of polynomial fit at specific points or weighted analysis?

I have some astrophysics data of "particle density vs orbital position" of a moon that emits a lot of particles. My research deals with the intensity of the scattered light which is ...
Claudia's user avatar
  • 21
0 votes
0 answers
19 views

Parameter transformation after fitting transformed data

this might be a basic question but I've had some doubts analyzing my data after fitting some parameters. For some background I'm using a non-linear LS method to fit data to the following function: $$ ...
Alejandro Aravena's user avatar
0 votes
0 answers
62 views

In machine learning, why do we say "curve fitting" when really fit the hypersurface?

Curve and surface are distinct concepts yet they seem to be used interchangeably in the context of model fitting. For a single argument function f(x) the concept of curve fitting is clear. The ...
qertoip's user avatar
  • 101
1 vote
3 answers
95 views

How do I perform a regression when I know there is a multiplicative relationship between the regression coefficients?

Suppose I'm attempting to use linear regression but instead of $$y_i = \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \beta_3 x_3 + \beta_4 x_4 + \varepsilon_i,$$ for scientific reasons, I know that $β_2=\...
John Henry's user avatar
1 vote
1 answer
68 views

Good fitting but high variances ($SEIR $ type model)

I am working on a susceptible ($S = S_1$ or $S=S_2$), exposed ($E$), infected ($I$), hospitalised ($H$), deceased ($D$) and recovered ($R$) model. Below is my model, \begin{equation} \begin{split} \...
Zizo's user avatar
  • 113
0 votes
0 answers
106 views

Computing the error in best fit parameters using chi-square grid

Suppose I have a scatter plot and I have fitted it with a curve that has two parameters 'a' and 'b'. I try various values of 'a' and 'b' between a certain range and plot a grid of chi-square values ...
Ethan's user avatar
  • 101
0 votes
0 answers
80 views

Calculating a percentile for a slice in a curve fit

Currently I have a of around 20000 datapoints, with the independent variable being time and the dependent variable being an arbitrary skill measure [Image 1]. I have fit a curve to the data using ...
user373996's user avatar
2 votes
1 answer
157 views

Getting point estimation and confidence interval for gaussian fit

I have a task where I should fit the data sample with curve_fit and get the peak's position and amplitude. I fitted data and got these values and their standard errors. I also need to find point ...
user373868's user avatar
0 votes
1 answer
782 views

Fit inverse polynomial function $1/x^n$

I am trying to fit the function $A/x³$ to some data points (X,Y). I tried using least squares to fit the function $A x^3$ to the data points (1/X,Y) using least squares. However I do not obtain a good ...
TheFibonacciEffect's user avatar
4 votes
3 answers
382 views

Perfect Prediction: Why Would We Ever Use a Statistical Model?

Dear statistics experts I need your help with something that has bothered me for a while now. My problem revolves around perfect prediction and essentially boils down to: Why would we ever set up and ...
This_is_it's user avatar
0 votes
3 answers
398 views

Fit Gompertz curve to growth data with decline phase

I measured the change in three traits (y1, y2, y3) over time (x). The three traits each reached a maximum at different times and then declined. I am interested in the phase until the max and would ...
vetna's user avatar
  • 13
0 votes
1 answer
15 views

Loss is growing between epochs in simple model [duplicate]

I am new to ML and trying to write a very simple model that can predict the future of a function given the past. That is to say, I define a simple cubic function (y = x^3 + x^2 + x) and apply it to a ...
I hate coding's user avatar

1
2 3 4 5
13