Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [fitting]

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

2
votes
1answer
30 views

Draw a graph and write its function based on the values and derivatives at different points?

This is a very general question since googling didn't bring anything useful up for me. 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
18 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
32 views
0
votes
1answer
34 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
97 views

Interpolator surface

Writing: ...
0
votes
1answer
49 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
19 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
262 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
134 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
157 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
110 views

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

I have the following data. ...
2
votes
5answers
144 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
141 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
57 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
87 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
30 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
115 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 ...
0
votes
2answers
78 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 ...
0
votes
3answers
91 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
31 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
84 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
19 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
62 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
78 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
46 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
426 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
93 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
58 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
246 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
29 views

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

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

How to pass starting values in matrix form?

Consider the following MWE, where I try to pass starting values to FindDistributionParameters[]: ...
14
votes
1answer
162 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
69 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
47 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
50 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
69 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
101 views

Problem with fitting square root-like function

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

Simultaneous fitting of polynomial parameters to data [duplicate]

I have two following data-sets: ...
0
votes
1answer
71 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
101 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
53 views
1
vote
1answer
30 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
50 views
0
votes
1answer
104 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
56 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
101 views

Fit Gaussian Function [duplicate]

I want to fit the Gaussian Function for the following data. How should I do it? ...
10
votes
1answer
149 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 ...
4
votes
2answers
79 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 ...