Fitting parameters of a function to explain given data
Questions tagged [model-fitting]
414 questions
0
votes
0 answers
Changing gmdistribution.fit bin size
I am currently using the gaussian mixture model to fit some data I have in matlab. I am using the gmdistribution.fit function, and have a question regarding the fit.
The following code is used to generate the PDF.
%Plot ECDFHIST
[ecdf_f,ecdf_x] =…

MichaelD
- 1
0
votes
0 answers
Create a graph to display observed and fitted values
I am trying to plot the observed and fitted values from a data set and its linear regression against a common time period variable using ggplot.
My data frame is called balances.
gdp.model <- lm(depvar ~
indepvar1 +
…

Eric Faulk
- 1
- 1
0
votes
1 answer
How to extract values fitted to a gaussian distribution in R?
I have a data frame X with 2 columns a and b, a is of class character and b is of class numeric.
I fitted a gaussian distribution using the fitdist (fitdistrplus package) function on b.
data.fit <- fitdist(x$b,"norm", "mle")
I want to extract the…

fabSir
- 39
- 4
0
votes
1 answer
How to create dataset for fitting a function in scipy stats?
I want to fit some data to a Pareto distribution using the scipy.stats library. I am not sure if the issue might be numerical, so just to be safe; I have values measured for the dependent variable (let's call them 'pushes') for the independent…

user3525685
- 1
- 1
0
votes
0 answers
R: Creating set of all possible ARIMA models
I am trying to create a set of all possible models for 1 variable using 10 predictors.
I know how to to this for the LM model, but is there a way how to create it for ARIMA models?
Or would it be OK to take fitted values and add them to lm…

user3577904
- 471
- 1
- 6
- 15
0
votes
1 answer
Resolving symmetry in gnls model
I'm trying to fit a logistic growth model in R, using gnls in the nlme package.
I have previously successfully fit a model:
mod1 <- gnls(Weight ~ I(A/(1+exp(b + v0*Age + v1*Sum.T))),
data = df,
start =…

Andrew
- 516
- 1
- 6
- 17
0
votes
0 answers
How can I fit a bounding (semi-)ellipsoid to a cluster of 3D data points?
I have a dataset of 3D points, which are arranged in clusters resembling a (semi-)ellipsoidal shape. When I try standard ellipsoid fitting as, e.g. implemented in the MATLAB function…

Michael
- 280
- 2
- 13
0
votes
0 answers
non-linear search for parameter values in python
I have this function,
dn =fp(xn)+an =Asin(2π k xn +φ)+an
an is gaussian distributed random noise with σ2 = 1 and
p denotes the particular choice of values of free parameters, p = [A,k,φ]
I need to write two functions:
(1)peval - is supplied a set…
0
votes
2 answers
Pymc 2d gaussian fitting
I am trying to fit a predefined 2d gaussian function to some observed data with pymc. I keep running into errors and the last one I got was ValueError: setting an array element with a sequence. I understand what the error means, but I am not sure…

bmsmith
- 58
- 7
0
votes
0 answers
solve a non-linear least squares optimization
I want to fit data with my custom function to calculate parameters of the model. Data of x and y are attached at the end. The custom function…

Leo
- 11
- 5
0
votes
0 answers
Function of parameter
I have written the codes below:
def model(axis, p):
a1, t1, a2, t2, a3, t3, a4, t4 = p
return a1*np.exp(-axis/t1) + a2*np.exp(-axis/t2) + a3*np.exp(-axis/t3) + a4*np.exp(- axis/t4)
This code is the definition of 4 exponentials. I have to…

MOON
- 2,516
- 4
- 31
- 49
0
votes
1 answer
R: Error in function "nls" for my datset
I have data with climatological pressure values and the heights of the stations where the pressure was measured. I would like to fit an exponential model to them. The data look like this:
x
[1] 539 575 1320 438 1840 496 316 552 325 386 1599…

user3017048
- 2,711
- 3
- 22
- 32
0
votes
1 answer
Fit an exponential growth curve and extract growth rate parameters (in ggplot?)
I currently have the following plot generated:
Data:
require(ggplot2)
just_growth_data=structure(list(ID = c(1L, 2L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L,
12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L,
25L, 27L, 28L, 29L, 30L,…

Atticus29
- 4,190
- 18
- 47
- 84
-1
votes
1 answer
fitting a model perfectly using jax in machine learning
Link to text file
Hi I am relatively new to Machine learning, I have managed to get a model like in the image attached, I would like to know what I can do more for the model to fit perfectly[model I made],i don't know much about choosing loss…

jeevan
- 13
- 2
-1
votes
1 answer
Fit a 2d linear stochastic differential equation with R or python
I have the following linear SDE
where all the parameters are positive. B is the Brownian Motion. I would like to fit the SDE to the following data, estimating the parameters:
dput(p)
c(-0.00499887430417606, 0.00136580945429492, 0.00272603530923862,…

Mark
- 1,577
- 16
- 43