Questions tagged [fitting]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
64 views

Ignoring one peak while fitting a Gaussian with multiple peaks [closed]

I have data that looks like this: When I try to fit a Gaussian to it, it obviously tries to fit the first peak, like so: This fit was found using ...
0
votes
0answers
51 views

Fitting results on two part graph

I have to do fitting of some experimental data that in the end should be represented like this: For the left part of graph from $(\pi,0)$ to $(0,0)$ experimental data is given as: ...
1
vote
2answers
94 views

Polynomial fit and Fourier transform plot

I'm pretty new to Mathematica so excuse me for obvious questions. I have a dataset, second column contains invoice amount and the first column contains days passed between each invoice date starting ...
0
votes
1answer
71 views

Evaluating fitted linear model [closed]

Apologies if this has been already answered, I have been fitting a linear model on some data and I am struggling to evaluate it later on. Dimensions[trainX] {...
0
votes
1answer
73 views

NonlinearModelFit : How to get the values of the individual parameters from the matrix “ParameterTable” [closed]

I just made a NonlinearModelFit : ...
1
vote
0answers
32 views

Does NonlinearModelFit result stores FitResiduals? [closed]

I fits a long data series with a complex model by NonlinearModelFit: fitnlm = NonlinearModelFit[...] Then I can use ...
0
votes
1answer
55 views

How can I parametrically fit a surface to another surface?

I begin with a function of two variables. A highly simplified version of that function is: F1->E^-E^- ϕ1 + E^-E^- ϕ2 $$e^{-e^{-\text{$\phi $1}}}+e^{-e^{-\text{...
0
votes
1answer
56 views

Improving the NonlinearModelFit

I've been trying to fit logarithmic function to the data below: ...
4
votes
4answers
697 views

How to fit the data?

Here is my attempt. ...
3
votes
1answer
96 views

Approximating decay rate of an amplitude and frequency of an oscillating function

I have an InterpolatingFunction constructed from a discrete set of values obtained by numerical methods. Let's denote it $f(x)$. The function demonstrates an ...
1
vote
0answers
62 views

Transform the data, and fitting it with a Lambert function

I got a list of numbers $x$: ...
2
votes
1answer
81 views

Determine a function based on the values and derivatives at different points

Googling didn't bring up anything useful for me, so I'm asking this question here. Suppose that I have the value of a function at some points plus the derivatives at those points. Now I am looking ...
0
votes
1answer
29 views

Fitting a numerical function with another function that depends on parameters

I'd like to fit a branch of the Lambert function : -ProductLog[-1, x] in the interval $[-0.35,0]$ with a function of the form $-a\log(-bx)+c+d x$ or $-a\log(-x)+...
0
votes
0answers
34 views

Fitting problem - comparison between two functions

Writing: ...
0
votes
1answer
55 views

How to find the fit for a numerical solution

I solved numerically a differential equation and I found a solution (solution that can be plot). I also tried an Ansatz to find an analytical solution and I got an expression. Using the numerical ...
2
votes
2answers
108 views

Interpolator surface

Writing: ...
2
votes
1answer
121 views

How can I generate a best fit quadratic function?

This is my first time using mathematica so I'm pretty confused. This question is based on the Sierpinski Triangle. The figure below shows the percentage of total even entries and total odd entries ...
0
votes
2answers
137 views

Fitting data using a parametric differential equation

I was fit the data using differential equation(eqns) and pfun I tried data fitting (I gave the parameter directly..a=22500, b=10^-22, c=2*10^-40 and scaling factor k=1.04 10^-36) ...
0
votes
0answers
22 views

In PearsonChiSquareTest[dataset1, dataset2], how exactly does M get chisqr?

I can't reproduce by hand Mathematica's PearsonChiSquareTest[dataset1,dataset2] on two datasets of discrete rand variables, with lengths ...
3
votes
4answers
287 views

Fitting of 2d data points with a function considering scaling, rotation and translation

I have the following set of 2d data points: ...
1
vote
3answers
184 views

Exact function that generated the data

I have "data" points as given below (e.g., for x-value = 1, the corresponding value of y is -23.110606616537147. (I apologize, it is rather large data array.) I need to find out the exact function ...
4
votes
2answers
551 views

Multi peaks fit (Voigt, Lorentzian or Gaussian)

I have started quite recently to use Mathematica and I don´t have experience in coding. What I need to do is to fit a peak which probably is a combination of two Voigt or Lorentzian. I have tried ...
4
votes
3answers
254 views

How do I find the root mean squared error of this fit?

I have the following data. ...
2
votes
5answers
166 views

Making batch data fitting robust — why does `NonlinearModelFit` fail occasionally?

I have over 1000 spectra I would like to batch fit and then use the results for further study. I'm not fitting anything especially complicated just a Lorentzian of the form, $$y(x) = A \frac{\gamma^{...
0
votes
0answers
39 views

Define output as the input

I want to find fitting parameters and then I want to use those parameters my further calculation. I used the following command for the fitting and I got values for the parameters. How should I define ...
-1
votes
3answers
176 views

Automatically fiting experimental data using NonLinearModelFit

Please, I have been working for some time to perform an automatic fit of my experimental data using an analytical function developed from a model based on the theory of kinematical diffraction. The ...
-1
votes
1answer
70 views

Gaussian fit with two variables

If I have an expression where two unknown parameters and a certain range of one parameter are present then how I can get best fitted values of such two parameters by varying this range?
2
votes
1answer
90 views

Properties of an arbitrary (i.e., not fitted) statistical model

Suppose that I have a data and a statistical model that is not the result of fitting, but has a different origin. For example, I have a list of measurements and a ...
0
votes
1answer
40 views

Fit data with a given function depending on parameters

I want to fit the data of a star's temperature with a function from a model. That function depend on several parameters. I want to know how can I find the value of those parameters. The data is: <...
-3
votes
1answer
121 views

Fit this data to a model in mathematica [closed]

I need to find a distribution or a model to fit this data set in Mathematica ...
2
votes
2answers
91 views

Obtaining the polynomial describing the motion

I have the following data points: Clear["Global`*"] dados={{0,0},{1,1000},{2,-750},{3,250},{4,-1000},{5,0}}; From these data I obtained the following ...
2
votes
3answers
116 views

How to get a plot with more precision in the data points?

Working with other software called SolidWorks I was able to get a plot with a curve very close to my data points: I tried to get a plot as accurate as this, but using the ...
1
vote
2answers
80 views

How to draw lines connecting nearby points [duplicate]

Suppose I have the following example data, data = Table[{Cos[theta], Sin[theta]}, {theta, 0, 2 Pi, Pi/8}]; which, when plotted, looks like this, ...
0
votes
2answers
98 views

Listplot, Plot and e function bug

For a project I have, I have let a program calculate required interias and friction for my system are R and J in the params. That program calculated 0.5*10^-3 and 0.013~ respectively. I'm trying now ...
0
votes
0answers
29 views

Fitting Categorical/Nominal Variable in NonLinearModelFit

I have a dataset with 4 continuous variable and 3 categorical variables. S far I have found a model which has all continuous variable using ...
2
votes
2answers
69 views

NonlinearModelFit doesn't seem to work with inverse function - please help!

I have the following defined: lvf1 = Table[{i, 1/(10 - i)}, {i, -100, 100}]; If I just run this, it gives me a "Power: Infinite expression 1/0 encountered." ...
2
votes
1answer
96 views

Linear mapping to fit points to subset of other points

I have some set of points making a specific pattern. I want to find a linear mapping (dilations + translations) to find a similar pattern in a second larger set of points. I want to find the best (or ...
0
votes
1answer
63 views

Forcing a 2D nonlinear fit through a set of points

I am trying to fit a set of data points using exponential functions as the underlying process suggests an exponential decay. The data points are: ...
6
votes
2answers
473 views

Fitting PDF to two normal distributions

I'm trying to fit this data As you can see there's two peaks. I want to fit this curve with two normal distribution with the same variance but different mean. So far I've got this: ...
1
vote
1answer
124 views

How do I access individual groups after using GroupBy on a Dataset object?

I want to read in an xlsx (Excel) or TSV (tab-delimited) file, assuming this results in a rectangular table of data. Then I after applying GroupBy (using multiple keys), I should have several ...
0
votes
1answer
126 views

Find interpolation with derivatives at some points

I am trying to find out how to find a good interpolation of a periodic function I have from some data points. The only problem is that I need to make sure that derivatives at the starting and ending ...
4
votes
2answers
254 views

Problem in using FindFit

I have the following set of data data={{0,0,0},{0,2,1},{0,4,2.247},{0,6,3.627},{0,8,5.031},{1,0,3.346}}; where the values are {n, L,$\varepsilon$} and satisfy ...
0
votes
1answer
39 views

How to find minima for non scalar-valued [closed]

I want to find minima. My code: ...
1
vote
1answer
51 views

How to pass starting values in matrix form?

Consider the following MWE, where I try to pass starting values to FindDistributionParameters[]: ...
15
votes
1answer
283 views

What are the practical differences between Fit, NonlinearModelFit, and FindFit

What are the practical differences between: FindFit,NonlinearModelFit,and Fit. Do they call ...
1
vote
2answers
77 views

Evaluating a formula that uses summations and products of vectors

Could someone tell me how to find beta1? I have the following data: I don't know how to write beta1, and I don't find ...
0
votes
2answers
55 views

Difficulty fitting an equation to a data set using exponential growth and logistical growth [closed]

I'm having an extremely hard time getting linearmodelFit, findFit, or nonlinearModelFit to give me an output that I can work with and I can't seem to find the problem. My list is ...
0
votes
2answers
67 views

Partitioning Mixture Distribution Dataset into constituent Distributions

Suppose I have a dataset that is derived from a random sampling from a mixture distribution ...
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: ...