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

learn more… | top users | synonyms (1)

14
votes
2answers
1k views

How to fit 3 data sets to a model of 4 differential equations?

I'm a biologist and a newbie in Mathematica. I want to fit three data sets to a model consisting of four differential equations and 10 parameters. I want to find the parameters best fitting to my ...
11
votes
3answers
2k views

How to use FindFit to fit an implicit function?

Now I am trying to fit some data with a implicit model function. Firstly, I tried a toy example. Toy example with input and output ...
15
votes
5answers
5k views

Estimate error on slope of linear regression given data with associated uncertainty

Given a set of data, is it possible to create a linear regression which has a slope error that takes into account the uncertainty of the data? This is for a high school class, and so the normal ...
18
votes
4answers
1k views

Mathematica envelope for the bottom of a plot, a generic function

I have the following set-up: xaxis = Table[x, {x, 0, 10, 0.01}]; yaxis = Table [Sin[x] + Abs[RandomReal[{-1, 1}]], {x, 0, 10, 0.01}]; ListLinePlot[Transpose[{ xaxis, yaxis}]] My ...
11
votes
4answers
4k views

Using FindFit to fit $a\,b^t$: how to avoid introducing complex numbers?

I'd like to find a model $f(t)=a\,b^t$ which matches the following data ...
29
votes
4answers
4k views

Simultaneously fitting multiple datasets

What is the proposed approach if one wants to simultaneously fit multiple functions to multiple datasets with shared parameters? As an example consider the following case: We have to measurements of ...
15
votes
5answers
5k views

Problem with NonlinearModelFit

I'm having trouble with a non-linear fit: fit = NonlinearModelFit[data, y0 + A Sin[\[Pi] (x - xc)/w], {y0, xc, A, w}, x] where ...
9
votes
6answers
7k views

How to determine the center and radius of a circle given three points in 3D?

I was wondering if anyone could give me a hand with this problem I have. I have six points on a plane, and I am trying to determine if they form a circle or not. I know that any three points in 2D ...
14
votes
3answers
1k views

Fitting fractional complex data with NonlinearModelfit

I've difficulites with the NonlinearModelFit function. In principle Mathematica should be able to deal with complex data. E.g. if I define the following table ...
16
votes
5answers
581 views

Finding the intersection of a curve with an interpolation function

There are no issues trying to find the intersection points of two defined curves. ...
18
votes
2answers
1k views

Finding the area, algebraic curve and jaggedness of an arbitrary shape

I start with a photograph of a shape (physically made by the flow of a liquid into another), of which I can extract the border, manually or using Mathematica's feature detect feature : Using the ...
10
votes
2answers
515 views

Is it possible to use the LevenbergMarquardt algorithm for fitting a black-box residual function?

I have a black-box multiargument multiparametric function of the type SRD[dataPoint_List,params_List] which accepts experimental data along with the parameters of ...
8
votes
2answers
1k views

FindFit returns worse result when putting constraints on parameters

I want to fit some data to a model of exponential decay using the FindFit function: ...
6
votes
4answers
3k views

Fitting a two-dimensional Gaussian to a set of 2D pixels

Imagine I have a set of data like the following: ...
4
votes
5answers
1k views

How to plot Fit functions?

If I do something like this f[x_]:=x^2 Plot[f[x],{x,1,10}] Mathematica plots the function $f(x)=x^2$, as expected. However, ...
18
votes
3answers
1k views

Data fitting with Image processing feature detection

I have some 2D data that once plotted looks like the following ...
8
votes
3answers
727 views

Ηow to create an interpolated CDF from its samples?

I want to use a distribution I have only aggregate statistics on, namely its CDF sampled at certain points. I would like to keep it "nonparametric" (remain noncommittal on the parametric form), but I ...
7
votes
1answer
237 views

How does Mma compute Confidence Intervals?

I am trying to understand how Mma computes the Confidence Intervals after a NonlinearModelFit. Consider the following example: ...
15
votes
2answers
967 views

FindFit returns Infinity::indet error when data contains {0,0}

Let's consider the following data: data = Table[{q, 2*q^2}, {q, 0, 2}]; and then, do a very simple fitting to this data: ...
2
votes
1answer
655 views

Combined fitting via NonlinearModelFit

I am trying to fit my data to a combined function model. Say I have two functions with some common parameter(s) f[x_]:= a*x^2 + b*x + c g[x_]:= d*x^2 + e*x + c ...
4
votes
2answers
404 views

What can I do to eliminate the error FindFit::nrjnum:?

I am testing the "Power Law with finite-time singularity" hypothesis for world population growth for a project. The data I'm using (same behaviour should also be exhibited by the stock market, thats ...
32
votes
4answers
2k views

How to visualize 3D fit

I have a data set of x,y,z values and I fit a function of x,y to the data. This works, but I can't come up with a nice way to ...
19
votes
5answers
2k views

How to perform a multi-peak fitting?

I am wondering how to implement the multi-peak detecting and fitting in Mathematica. Following is an example of fitting the data using three peaks (such that the data ~ peak1 + peak2 + peak3). The ...
13
votes
4answers
1k views

Mathematica Implementations of the Random Forest algorithm

Is anyone aware of Mathematica use/implementation of Random Forest algorithm?
12
votes
0answers
413 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 ...
4
votes
1answer
809 views

How do I find the best parameter to fit my data if the model is a interpolating function?

Hi I have a question regarding to find the best parameters for my model to fit my data. I have 3 ordinary equation, and I now just picked some parameters (...
3
votes
1answer
261 views

NonlinearModelFit does not find a good fit

I am trying to fit my data to the following function, $$\frac{a b t \left(\log \left(\frac{-a d t+a t-1}{a d t}\right)-2\right)}{4 (a t-1)}-c$$ ...
11
votes
1answer
301 views

Does anyone have experience with performing symbolic regression using Mathematica?

I understand that there is at least one Mathematica package, DataModeler commercially available for symbolic regression. I'm seeking any observations with this or any other similar tool. I'm ...
5
votes
2answers
466 views

What is the best distribution for my histogram?

I defined a security bound for a random walk (cube with 15 lengh) and i have this code to obtain a sample of the random times at which the random walk crosses the boundary for the first time: ...
3
votes
1answer
701 views

Methods for NonlinearModelFit

I am using NonlinearModelFit for a thesis project. I get quite different results if I change the Method to LevenbergMarquardt or QuasiNewton or ConjugateGradient ...
6
votes
1answer
236 views

Having trouble fitting data using NonlinearModelFit

I'm trying to fit data = {{2002, 45000}, {2004, 90000}, {2005, 120000}, {2013, 211000}}; to an exponential function ...
5
votes
2answers
985 views

In finding a logarithmic fit for some data (of the form a*Log[b*x]), WolframAlpha succeeds where Mathematica 7.0 fails, why?

I would like to fit a function of the form: $a \log(b x)$ to a set of data: ...
2
votes
3answers
215 views

Estimating a distribution using binned data

I have data from which information has been irretrievably lost through binning and I am trying to find a plausible distribution from which it derives. There is an academic paper suggesting that the ...
1
vote
2answers
142 views

Can't find a fit for Erf

I have the following numbers ...
6
votes
1answer
328 views

Mathematica vs Sigmaplot (Non LinearModelFit)

I asked a question in a previous post that was closed because "The title of the question is not correct and the issue here is too trivial to help anyone later". NonLinearModelFit It's possible ...
5
votes
2answers
303 views

Find parameters of ODEs to fit solution data

Problem How to find the initial conditions x[0],y[0] and the optimal value of parameters ...
4
votes
1answer
163 views

FindFit not giving a good fit despite good initial parameters

I'm having a problem with FindFit not giving a good fit to my data, even though the initial parameters I give look really good when plotted. The fitting function is ...
4
votes
2answers
321 views

Numerical Integration as Model for Nonlinear Fit

I'm trying to do a fit for parameters of a function within an integral but I'm getting errors when I try and run it. Essentially I want the following fit to work out: ...
2
votes
1answer
104 views

making a function of fit results

I have 13*25 datasets consisting each of around 40 points. They are all linear I can easily fit them using fit function but my problem is when I want to call them I want them to be functions. I want ...
2
votes
0answers
184 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 ...
1
vote
1answer
119 views

NonLinearFit with “complicated” integral model

I have a set of data $y_i (z_i)$ with errors $\Delta y_i$ ...
1
vote
1answer
81 views

Can ParametricNDsolve be used for coupled PDEs with 5 parameters?

I have a system of coupled PDEs with five parameters that I only know ranges for rather than explicit values, and I was wondering if I could define a parametric equation with ParametricNDSolve and ...
1
vote
1answer
142 views

How do I construct a non-linear model from experimental data?

I want to find a function $w=f(x,y,z)$ that fits experimentally determined values of w. For example, assume ...
1
vote
1answer
371 views

Keeping Nonlinear Model Fit Real

So I am using the NonlinearModelFit (NLM) command with a fairly simple function. There are 4 unknowns and the (x, y) points that ...
0
votes
1answer
179 views

FindFit: why do I get negative value as result?

I am trying fo fit a model to data using FindFit. ...
0
votes
1answer
296 views

Fit implicit function

Can anyone help me with fitting an implicit function to data? The function is given by: a*x^2 + 2*b*x*y + c*y^2 = e under the condition ...