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
0answers
23 views

Why can't a make a new varible for a graph fit? [on hold]

I'm trying to make a Least Squares fitting in Mathematica, but it says it can't interpret my data to do a fitting. It lets me plot the data, but that's it. Is there something wrong with my data? I ...
0
votes
1answer
13 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
104 views

Fit this data to a model in mathematica

I need to find a distribution or a model to fit this data set in Mathematica ...
0
votes
2answers
75 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
88 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
29 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
78 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
18 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
61 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
72 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
44 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
422 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
85 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
48 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
241 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
27 views

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

I want to find minima. My code: ...
1
vote
1answer
46 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
144 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
65 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
44 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
45 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
66 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
80 views

Problem with fitting square root-like function

I have following data: ...
0
votes
0answers
41 views
0
votes
1answer
56 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
97 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
48 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
49 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
46 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
73 views

Fit Gaussian Function [duplicate]

I want to fit the Gaussian Function for the following data. How should I do it? ...
10
votes
1answer
138 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
73 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
57 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
60 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
70 views
4
votes
2answers
121 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
72 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
54 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
30 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
48 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
61 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
45 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
99 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
90 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
51 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
75 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
75 views

How to get more digits from Fit

Taking the example from the Mathematica documentation for Fit, consider the following ...