Questions tagged [fitting]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
80 views

Estimation of the error for zero degree of freedom fit with error bar

I am performing a fit on experimental data with zero degree of freedom but with error bar using NonlinearModelFit: ...
0
votes
1answer
121 views

Problem with fitting square root-like function

I have following data: ...
0
votes
0answers
43 views

Simultaneous fitting of polynomial parameters to data [duplicate]

I have two following data-sets: ...
0
votes
1answer
86 views

Fitting complex equation

I used the following code for fitting but it does not produce an output.I kept it nearly 3 to 4 hours but it does not give any output. How should I make it correct?I have used two equation(f1,f2).I ...
0
votes
1answer
173 views

How to do good surface fitting in Mathematica?

I would like to fit a 3D surface in Mathematica, and I can do a rough fitting using the following code: ...
0
votes
0answers
68 views

Surface fit in Mathematica for sigmoid type of surface

...
1
vote
1answer
34 views

Get properties of a list of fitted models (objects)

If I do a fit, such as nlm = NonlinearModelFit[data, {x^a Cos[b x + c]}, {a,b,c} ,{x}] then you return a FittedModel object, ...
1
vote
1answer
58 views

Unable to understand how FindFit function works. [closed]

...
0
votes
1answer
116 views

Problem using Nonlinearfit on integral function

I tried to fit my data with a very complicate Integrated function. But I get many errors messages when I perform the fit. For exemple I get : NIntegrate::inumr: The integrand ....has evaluated to ...
0
votes
1answer
109 views

Model fitting for concave curve: test if asymptote or convergence exist

I am asking a double check if conceptually I set up proper model and proceeding in good direction to drive conclusions. I have a distribution that looks like this: I want to test if for increasing x ...
1
vote
1answer
304 views

Fit Gaussian Function [duplicate]

I want to fit the Gaussian Function for the following data. How should I do it? ...
11
votes
1answer
249 views

Quantile Regression using Neural Networks (Custom Loss function)

I would like to perform a Quantile Regression within Mathematica's neural network framework. Since there exist a couple of tutorials for this exact problem in Tensorflow, i.e. Deep Quantile ...
0
votes
1answer
45 views
4
votes
2answers
102 views

Why does the PearsonChiSquare from FindDistribution and DistributionFitTest differ by a factor of $10^{20}$?

This is similar to the unanswered "Why the results of FindDistribution and DistributionFitTest are not consistent?" My more specific question is: Why do the PearsonChiSquare values for ...
0
votes
1answer
61 views

What is the best fit for this data?

First I entered the data and graph it, then I used the non-linear adjustment command to have a model of my data, I asked Mathematica for the square r, to know how good the model was, then I put ...
1
vote
1answer
168 views

Linear regression with weighted data?

LinearModelFit doesn't seem to support WeightedData objects. Is there anything I can do smarter than repeating the data ...
0
votes
2answers
92 views

FindFit cannot give me the right result. What should I do?

...
4
votes
2answers
128 views

How do I treat the results of Fit as text?

I would like to take the results of Fit (or any FittedModel) and treat them as text, including making substitutions for the ...
2
votes
1answer
83 views

Fitting an equation to data set, am I doing this right?

I have a large data set of different values of time. I want to make 1) a histogram 2) fit an exponential function of form A+B*exp(-t/b) from the data To my understanding, this is how I'd do it <...
0
votes
1answer
83 views

Estimating parameters for pair of differential equations efficiently

I'm trying to estimate the parameters for the following pair of differential equations ...
0
votes
0answers
35 views

Ranging the parameter in Fitting

I want to apply a range for parameters(a,b,c,d).What is the correct way to do it? ...
0
votes
0answers
55 views

Parametric solution of a system of two nonlinear ODEs with data describing only one the functions

I have the following pair of nonlinear ordinary differential equations ...
3
votes
0answers
74 views

Deal with noise and missing points in data [closed]

I have run a simulation which has resulted in some bad data (see graph below). What would be the best way to detect and interpolate the missing points in Mathematica (i.e. remove the noise)? Raw ...
1
vote
1answer
47 views

Why does LinearModelFit give me an equation in $z$ rather than $x$?

I am working on a Mathematica notebook and making graphs for my lab. I can't make a graph for my linearized data as LinearModelFit gives equation in ...
0
votes
1answer
165 views

Convolve and fitting

I want to convolve two equation, then I want to find the parameters. But it doesn't give the answer and Takes too much time. What is the wrong with my code? ...
1
vote
1answer
109 views

Difficulty with FindFit with complex equation

I want to fit the following equation for my experimental data. I used the following code but it does not give the answer. ...
0
votes
0answers
84 views

NonlinearModelFit Method-> “LevenbergMarquardt”, “Newton”, “QuasiNewton”, etc?

Could someone please point me to a tutorial comparing and contrasting the advantages and disadvantages of the many methods to choose from when applying NonlinearModelFit?
3
votes
2answers
95 views

How to correctly write a PDE solving module for NonlinearModelFit

I need to fit a model defined by numerical operations to test data and find the parameters of the PDE. The problem is that I have to NIntegrate the result obtained ...
0
votes
1answer
50 views

fitting data with parameter plus distribution

I have data that I would like to fit with Bessel function https://www.dropbox.com/s/7se9mb2epbietng/data.dat?dl=0 ...
3
votes
2answers
133 views

How to apply assumptions to parameters for FindDistributionParameters?

Say I have data that I want to fit to a distribution while applying assumptions on one or more of the parameters. For example, for ParetoDistribution[k, α, μ] <...
5
votes
1answer
115 views

Automatic Piecewise Approximation

I would like to create the following function: It should approximate a function func[x] by piecewise polynomial interpolations, splitting the approximate function ...
3
votes
3answers
237 views

Find good polynomial fit of square root

I would like to find a good polynomial fit of the square root. I tried the following: ...
1
vote
1answer
57 views

Scaling and shifting in fitting of a LogNormal distribution from experimental data

I have the following set of data: ...
-1
votes
1answer
286 views

How to do two Lorentzian fit

...
1
vote
2answers
466 views

How can I do a “linear” fit on a log log plot

I have plotted some data with a log scale on both axes as shown in the image below. I want to be able to fit this data such that the fit appears as linear on this log-log plot but I haven't been able ...
2
votes
0answers
206 views

How I can use FindFit to simultaneously fit two data sets to two equations having shared parameters? [duplicate]

I think that FindFit package with the method Nminimize yields global minimum if initial values of adjustable parameters are ...
2
votes
0answers
88 views

How to speed up multiple calls of NonlinearModelFit?

I'm trying to do an insane amount of non-linear fits to large amounts of data sets. However, I found that the NonlinearModelFit is horribly slow. Here's the setup: ...
1
vote
1answer
34 views

Why isn't LinearModelFit behaving consistently at different levels of lists?

I get the following results when I run the following regression on datass: ...
0
votes
2answers
80 views

FindMinimum from DensityPlot

I need to find the values of x, y that correspond to the minimum value of the function (in this example it is -1.0, the black area). Code example: ...
0
votes
0answers
72 views

How do I fit experimental data by solving 3 coupled ODEs with adjustable parameters?

I want to fit experimental data by solving 3 coupled differential equations.The ODEs are rate equations modeling the dynamics of hot carriers in semiconductors after excitation. The function use fot ...
1
vote
2answers
242 views

Curve fitting with variable number of Gaussian curve

I have the data which appears like And I decided to use three Gaussian curves to fit it. (This code allows me to manipulate all three curves and put in best guesses for peak positions. Using these ...
-1
votes
1answer
62 views

Performing a nonlinear fit from data imported from a text file

I have a text file data that I imported and I want to fit it with a given equation. I tried to fit but it did not work and gives Here is my code: ...
2
votes
3answers
125 views

Fitting two equations to diferent parts of the same dataset

I have a system that transit between two different states. Each state output varies linearly with time, given by $m t+c$, where both lines intersect the $x$ axis in the same point. The output of this ...
0
votes
1answer
53 views

Nonlinearfit with incomplete data

Suppose I have an ODE model and some incomplete time series data data = {{0,1},{5,6.2},{14,18.4},{28,57.3},{90,105.2},{180,98}} My question, can I still use ...
2
votes
2answers
92 views

Problem using NonlinearModelFit to 2 coupled differential equations

I am trying to find the parameters of a set of differential equations given experimental data. Before I tackled my set of 12 equations, I tried to solve a simpler and similar 2 equation system but ...
4
votes
1answer
127 views

How do I make LinearModelFit flexible to number of parameters using FromLetterNumber?

I want to run LinearModelFit where the number of parameters is not fixed. For example, the following ...
2
votes
1answer
91 views

How to improve my fit?

I use the following code to fit some data given in a previous question of mine: ...
-1
votes
1answer
124 views

What is wrong with my fit?

I am trying to fit the following data: data = Import["https://pastebin.com/raw/gHdYLCbA", "Table"] I use the following code: ...
0
votes
2answers
314 views

Nonlinear model fit with Numerical integration

I'm having trouble writing a Nonlinear Model fit where the model is a numerical integral evaluated with NIntegrate. I have read other questions and answers about more or less the same problem, but for ...
1
vote
1answer
131 views

Improving nonlinear model fit (piecewise function)

I have a piecewise relatively simple function, and I'm looking for three parameters. Here's an MWE: ...