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

learn more… | top users | synonyms (1)

4
votes
1answer
122 views

Fitting numerical model to experimental data

I have diffusion equation with the initial/boundary conditions: ...
0
votes
0answers
26 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 = ...
2
votes
0answers
88 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 ...
3
votes
1answer
99 views

FindFit with parameters which are simultaneously in initial conditions

I have RLC circuit. I would like to find R and L by using FindFit, but L is in initial condition and I have problem with it. Could you help me ? ...
2
votes
1answer
75 views

Non-linear curve fitting with multiple parameters and conditional expression

The above integral(Bloch Gruneissen formula) is what i like to fit with my experimental data.I am new to Mathematica. To cross-check the fit results obtained in other software, I try to fit with my ...
17
votes
5answers
2k views

Mathematica Implementations of the Random Forest algorithm

Is anyone aware of Mathematica use/implementation of Random Forest algorithm?
-1
votes
1answer
78 views

Formatting and inserting a parameter table into a plot

I'm fitting data, and I want to put the parameter table generated by NoninearModelFit into the plot. How can I do that in a reasonable way? I want to format the ...
4
votes
1answer
108 views

Removing Linear drift from an oscillating data

I have an array of 800,000 data measured at 1.1s time gap. It is oscillating data but has clear linear drift. I want to remove this linear drift. But the estimates by ...
2
votes
2answers
239 views

SinglePredictionBands versus MeanPredictionBands from NonlinearModelFit

From my Statistics lectures I know the term confidence and prediction interval, whereas the confidence interval is smaller than the prediction interval. If I plot the mean and single prediction bands ...
1
vote
0answers
40 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 ...
38
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 ...
0
votes
0answers
74 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 ...
24
votes
4answers
506 views

What is the natural way of using Dataset to get a FittedModel?

The new Dataset in Mathematica 10 is a great addition to the language, potentially reducing the convenience gap with R. Given this, I would like to understand what the equivalent simple or natural ...
1
vote
0answers
28 views

How to fit data with numerical solution of system of parametric ODE? [duplicate]

I need to find the parameters (k1,k2,k3,k4,k1r,k2r,k3r,k4r) that fit my data (list of [Intensity, time]) using the function ...
0
votes
1answer
51 views

Can I use boolean parameters in LogitModelFit?

For example, to use 1 as True and 0 as False: ...
1
vote
0answers
91 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 ...
0
votes
0answers
53 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: ...
3
votes
3answers
156 views

Zero-order interpolation not going fully around

Connected to this question, I want to do a zero-order interpolation of a bunch of datapoints which is periodic. The code I use is as follows: ...
4
votes
0answers
173 views

Problems extending NelderMeadMinimize into 2D

I've been playing around with Oleksandr's compiled Nelder-Mead Minimization function presented here: Shaving the last 50 ms off NMinimize First, I'll create some sample data. This creates a noisy ...
0
votes
1answer
91 views

Constraining some rows from LeastSquares to lines

For two matrices, A and B, with dimensions {n,p} and ...
0
votes
1answer
98 views

Making a fit to my empirical data [closed]

I want of plot the fit for the graph The Data for this graph is ...
0
votes
0answers
52 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. ...
2
votes
3answers
112 views

Plot least squares curve on Linear Log Plot

I have the following Data: ...
2
votes
0answers
41 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. ...
3
votes
3answers
141 views

Fitting the Plot by fourier Series of either sine or cosine

I have list of data and its plot and I don't know how to fit the plot with fourier series of either sine or cosine. Full Data: ...
0
votes
1answer
44 views

What is the definition of FitResiduals

What is the definition of FitResiduals in Mathematica? I could not find its definition in the Mathematica help. Is it the same as chi squared?
0
votes
1answer
63 views

Logarithmic curve fit in data

I have the following data which are the theoretical: ...
7
votes
2answers
227 views

Does FindFit support complex numbers or doesn't it?

Inspired by this previous question: Findfit doesn't give the good fit; Changing the starting values will not change the results. Consider the following complex-valued dataset. ...
1
vote
3answers
132 views

Why does FindFit seem to have trouble fitting exponential data?

I have 4 data points. t is in minutes, and y is radioactive counts per minute. When I input the following lines: ...
2
votes
1answer
64 views

Piecewise conditions with a parametric PDE

I'm using ParametricNDsolve to check best fit of a model (function Eb1) with some data, and I have four free parameters I want to test. I can easily construct a Parametric solution between the two ...
0
votes
1answer
96 views

Fitting data to a Poisson distribution

I'm trying to fit a Poisson Distribution to data produced in a lab. I've successfully made a Histogram of the data, which looks like: However, when I try to fit the Poisson Distribution using: ...
1
vote
2answers
53 views

FindFit is producing a list of imaginary numbers when there is non

I am trying to find the fit of an equation to some data and mathematica thinks there is a list of imaginary values. My data is all real positive number. ...
0
votes
0answers
55 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
2answers
112 views

Error function fit of data

I have this experimental data set which I know should follow the Complementary error function. My goal is to find the σ of the associated gaussian distribution. However, I cannot seem to do it in ...
1
vote
3answers
202 views

To obtain an equation for a given curve

I have obtained the graph, I would like to know its equation. The graph seems to be a hyperbolic spiral which, its equation reads, $r = a/\theta$. I read here and also, but these are concerning the ...
2
votes
2answers
751 views

Find a best fitting curve for some data with no regular pattern

Suppose some data with no regular pattern is given, so common patterns of functions all fail to fit it. Then how can one find the best fitting curve? I believe there will be some data for which we can ...
0
votes
0answers
38 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]; ...
3
votes
2answers
195 views

In a ListPlot of LinearModelFit, plot error band

This is similar to this question. The fitted line can be plotted alongside with the data with this code: Show[ListPlot[data], Plot[lm[x], {x, 0, 5}]] I would ...
0
votes
1answer
210 views

Obtaining the envelope of an oscillating function and perform fitting

There is an elegant way to obtain the envelope of an oscillation function explained here http://mathematica.stackexchange.com/a/27854/15966 My question is how to modify the code below so I can fit ...
0
votes
1answer
185 views

Exporting tables of interpolating functions

A few weeks ago I asked a question about manipulating parameters in NDSolve (Looping with NDSolve?) , and received some very helpful advice about the manipulate environment; now I want to take the ...
2
votes
2answers
134 views

Fitting a variable using multiple equations

I would like to find the best fit of two variables for a number of approximate equations, such as: 1x+2y+2=7.04 2x+y+4=7.98 1.5x+1.5y-2=2.53 1.8x+3y-1=6.77 That ...
5
votes
3answers
174 views
0
votes
0answers
32 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 ...
2
votes
1answer
57 views

Trouble with using a log10 function in NonlinearModelFit

I was wondering why won't mathematica give a result where the function is also Log10, instead it gives the ordinary Log. Is it ...
1
vote
0answers
35 views
0
votes
1answer
83 views

Find polynomial equation for set of 3D data

data was given in columns in the order {y, x, z}, with y dependent on x, z ...
5
votes
0answers
69 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 ...