Questions on the use of Mathematica to construct models for approximating empirical data.

learn more… | top users | synonyms (1)

13
votes
0answers
517 views

Nonlinear least squares on a GPU with Mathematica 9

Update: A Mathematica wrapper for (https://github.com/zitmen/cuLM) should allow for us to directly implement the Levenberg-Marquardt algorithm in CUDA for nonlinear least squares fitting. In a ...
6
votes
0answers
188 views

Using perpendicular offsets in FindFit

I want to use perpendicular offsets in the built-in FindFit function. Are there any possible ways or do I have to code everything by myself?
5
votes
0answers
206 views

Problems extending NelderMeadMinimize into 2D

Update The eventual route I followed was to adapt a version of the NM-simplex written in C and link to it with MathLink. Once I've tested this out fully I'll post it here. I've been playing around ...
5
votes
0answers
70 views

Third syntax version of LogitModelFit: unexpected result of “BestFit”

The third listed syntax version of LogitModelFit allows one to specify input in a simple way: Only a design matrix (with a row of values of the explanatory input ...
5
votes
0answers
625 views

Analytical model fitting

I have a special type of model fitting problem that I am trying to solve in Mathematica. Any insight how to attack it using available tools of Mathematica will be great to hear. We have a variable $$ ...
3
votes
0answers
57 views

Stuck in local minimum in NonlinearModelFit using Simulated Annealing?

I recorded a set of experimental rates $r = r(c,T,P)$ at 2 values of $c$ and >15 values of $T$. $r(c,T,P)$ obeys the following functional form: $$ r(c,T,P) = ...
3
votes
0answers
129 views

Module in numerical model for NonlinearModelFit is slow and leaks memory

I am trying to make a NonlinearModelFit where the model is the result of a numerical calculation. My code works, but it is very slow and also seems to have a memory ...
3
votes
0answers
270 views

What exactly is “ParameterErrors” of NonlinearModelFit?

I am trying to get what I call a "$\chi^2$ fit". This means taking a function $f(x,p)$ of the variable $x$ with a parameter $p$ and finding the value of $p$ that minimizes the "distance" from a data ...
3
votes
0answers
240 views

Is it possible to marginalize one or several parameters obtained from fitting procedure?

Statistical model analysis package has a few fitting functions. Their arguments are data points, fitting model and parameters in the fit. The result is a set of best values for parameters, which ...
3
votes
0answers
202 views

Mathematica Complains about Non Symmetric Covariance matrix, when it's not the case

I was doing some fitting with Mathematica7 using NonlinearModelFit. It's quite long the program to do the fit and that's why I am not displaying here ... It goes ok, and I can get the fit parameters ...
2
votes
0answers
205 views
+200

Curve fit based on minimal data

Inspired by the fantastic answers here and here, I would like to ask a questions along similar lines. I have 6 curve types that follow these rules: Type A: If point 1 is positive and point 2 is ...
2
votes
0answers
97 views

Power::infy: error using FindFit

I have a 2D data to fit (the Airy type pattern from diffraction of Gaussian beam on the circular aperture). Please see the attached picture. I was going to use a function like ...
2
votes
0answers
45 views

Why do EstimatedDistribution and DistributionFitTest work this way

I am fitting some time-series data to both a stable distribution and a normal distribution in order to assess the goodness of fit of each. Along the way I encountered the following confusing result. ...
2
votes
0answers
135 views

NonlinearModelFit is not giving the fit with minimum chi^2

First of all, a bit of background, I am using Mathematica to fit angular distributions of gamma rays, so I apologize for some of the serious messiness in the formulas. The data is simple I have three ...
2
votes
0answers
586 views

Linear regression with x and y errors

I have a question about finding a linear regression weighted with x and y errors. I found the answer provided by 0x4A4D in Estimate error on slope of linear regression given data with associated ...
2
votes
0answers
217 views

NonLinearModelFit with Two Dimensional List of Weights

I'm currently trying to fit Planck's law (B[λ, T]) to measurements, thereby determining Planck's constant. I have a list of triplets containing wavelength, ...
2
votes
0answers
581 views

ParametricNDSolveValue or NDSolve + fitting

I have been trying to find the value for the parameter kestim that yields the best fit of a model to some data points. datac has ...
2
votes
0answers
202 views

How to predict some constant number of values with NeuralNetworks

Example: << NeuralNetworks` data = {Sin[#]} & /@ Range[0, 4 Pi, 0.5]; learn = data[[1 ;; 15]]; Now, lets fit our neural network: ...
1
vote
0answers
27 views

How to regress negative log?

I made a regression using Linearmodelfit. The residual-fit plot showed that this was not a good approximation. Now I'm trying to use Nonlinearmodelfit. I assume my data to have a negative log look. ...
1
vote
0answers
24 views

Non-aggregated solution for NonlinearModelFit

I try to fit a rather simple functional form to data, lm = NonlinearModelFit[estdata, a + b*x^2, {a, b}, x] obtaining ...
1
vote
0answers
48 views

Comparing two ways of fitting systems of ODEs to data

I'd like to ask you if you see any difference between the two following ways of estimating parameters. Given my system of ordinary differential equations that I want to use to find the values of all ...
1
vote
0answers
45 views

Cross-validation of a FittedModel

Although I would know how to perform cross-validation tests after fitting a model using a function like NonLinearModelFit, I wonder if there is a way to do this providing the right parameters to the ...
1
vote
0answers
107 views

Memory problem in Mathematica 10

I'm having a problem with memory. I'm doing nonliner fits of several data lists to a system of differential equations. When I evaluate the "Do" cycle the memory grows with the iteration step up to my ...
1
vote
0answers
98 views

Developing easy code to apply Delta Method to generate prediction bands for custom distributions

I think that this is an interesting issue for all those who when to not only adjust one prediction function, but also to obtain the prediction bands to asses the graphical or tabular error I'm trying ...
1
vote
0answers
38 views

A more efficient way of fitting a non-linear model that returns an entire list?

I have a function that takes two parameters, del and nu, and returns a list npoints long ...
1
vote
0answers
121 views

LeastSquares with some parameters missing

I want to do a partial least squares (PLS) regression using LeastSquares on my data. The input parameters are temperature, humidity and pressure for a given date. ...
1
vote
0answers
94 views

Can we ask ComponentMeasurements to use NonLinearModelFit to return a covariance matrix for underlying intensity data?

I'd like to be able to calculate a covariance matrix for some data underlying a morphological component. Provided this data, I can write something like: ...
1
vote
0answers
602 views

How to Output Chi-Squared Statistics when using NonLinearModelFit

I am using NonLinearModelFit for some curve fitting and I was wondering if NLM is able to output chi-squared/leastsquared statistics from the best-fit parameters and confidence intervals. From my ...
1
vote
0answers
200 views

To what extent can NonlinearModelFit be sped up?

Can NonlinearModelFit be parallelized or compiled to allow one to achieve a scalable speedup for a fitting procedure? Attempting to use this function to fit a ...
0
votes
0answers
30 views

Fitting a plane from a set of (x,y,z) values with uncertainties on 3 variables

I would like to fit a plane from a set of measurements (x,y,z) with uncertainties on the 3 variables. Currently I am using the command "LinearModelFit" that computes the best plane but I have a ...
0
votes
0answers
41 views

Convergence Problem using FindFit

I have the following input where there is a convergence problem in the FindFit as shown in the attached figure.The figure shows 2 plots: one of the real data and the other of the fitted line. Any ...
0
votes
0answers
44 views

FindFit with PolyGamma function

...
0
votes
0answers
20 views

Why does my Dynamic NonliearModelFit keep running?

I have complex data and which I am fitting to a complex formula. In order to use NonlinearModelFit I split the formula and the data into real and imaginary parts. As usual NonlinearModelFit is ...
0
votes
0answers
90 views

Defining a Gaussian Distribution Fit to data

I am given a set of data and told ahead of time that the data will need to be fitted to a Gaussian Distribution. I know that Mathematica has preset functions for linear, quadratic, and cubic fits, but ...
0
votes
0answers
32 views

NonlinearModelFit::nrlnum error using FindFit /NonlinearModelFit

My question is related to my previous post I'm trying to fit experimental data (after suggestion here by David) with Airy type function `data01 = Import["366.0000cm_660.0000nm.png"]; data02 = ...
0
votes
0answers
69 views

Fit convoluted Gaussian and Lorentzian functions to a peak profile

Thanks in advance for anyone who read this. I have a peak profile data like this: ...
0
votes
0answers
55 views

No real number fitting double exponential in Mathematica

I am trying to fit a double exponential curve to my data, but I got the error saying there are non real number. Also I tried with starting values for my 4 parameters, but this does not work either. ...
0
votes
0answers
70 views

Horizontal shift in fitting data by a sinusoidal nonlinear model

I have data that can apparently be fitted by a sinusoidal function in form $D+A\sin(B(x-\frac CB))$. I tried doing the best fit in Mathematica using ...
0
votes
0answers
39 views

How do I constrain the result of fitting my non-linear model to be greater then 0

fitresulty21 = NonlinearModelFit[ydata21, {funfit[y, σ, A, B, x1, d, d/2], A > 0}, {{x1, 20}, {σ, 3}, {A, 200}, {B, 2000}, {d, 110}}, y]; ...
0
votes
0answers
37 views

Fix Parameters for NonLinearModelFit?

Is it possible to fix the parameters for NonLinearModelFit within the function itself instead of defining the fix parameters at the beginning of the notebook? I am ...
0
votes
0answers
42 views

How to approximate a computationally expensive 5-dimensional manifold?

I have a 4-parameter family of functions, which I'll refer to as y[a, b, c, d][x]. In this notation, a, b, c, d are the 4 ...
0
votes
0answers
43 views

Fitting data involving units

I want to fit some data to a model. However, if the data involves units in the independent variable, fitting seems not to work. As an example, consider the code ...
0
votes
0answers
57 views

fitting system of ODEs - “part2 of {} does not exist” errod

I'm trying to fit my data to a system of ODEs: x'[t]==a*x[t]+b*y[t] y'[t]==c*y[t]+d*x[t]+e*z[t] z'[t]==f*z[t]+g*y[t] having t,x[t],y[t],z[t]. I followed the code ...
0
votes
0answers
91 views

Speeding up Nonlinearmodelfit by constraining parameters?

I have a complicated parametric PDE that can be fitted to some data with NonlinearModelFit, but takes several hours to estimate the best values of the four free parameters. Currently, the code ...
0
votes
0answers
71 views

Simultaneously fitting data sets with many variables as free parameters

I found a partial answer in the documentation centre, but would like to expand on it and know how can I fit multiple sets of data and extract the parameters from them. It is an eigenvalue problem - We ...
0
votes
0answers
234 views

histogram fit for probability density

I am trying to fit the (probability density) histogram of some data with the exponential function, but I am having difficulties. My raw data are in file called ...
0
votes
0answers
42 views

Supply parameter values in NormFunction of FindFit

As I understand the input to the NormFunction is a list of residuals. Is there a way to get parameter values into the NormFunction as well? I ran into a problem where the norm depends on the values of ...
0
votes
0answers
75 views

Find Numerical Derivatives (With Errors) given some data

I have a question. Suposse I have some data with their respective errors: ...
0
votes
0answers
187 views

Non linear model fit mathematica

I want to fit experimental data (temp,alpha) to the following equation for calculating k and Ea -Log[alpha]^n = function(k,Ea,temp) However i do not know ...
0
votes
0answers
133 views

NonlinearModelFit with multiple parameters

I am now trying a slightly more complicated model which actually consists of finding the parameters of 2 particles in an Image (I attached an Plot of an image). Although I put very good initial values ...