# Questions tagged [fitting]

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

1,760 questions
Filter by
Sorted by
Tagged with
24 views

### How to interpret the output of DimensionReduce

In the documentation for DimensionReduce and functions related to it, there is an example in the Applications section where the Fisher iris dataset from ExampleData is reduced. The data is described ...
• 1,146
103 views
+50

### Fastest way of removing outliers from a data set which depends on a variable

Edit: I meant $j\to\infty$... Suppose we have the following code: ...
• 57
320 views
+50

### Finding the asymptotic rate of growth of a table of values

Suppose we define entropy[k] where: ...
• 57
45 views

### Inbuilt function in NonlinearModelFit

Can you please tell me about the inbuilt function in NonlinearModelFit? Is it related to least-square fit? If yes, please describe. ...
39 views

### Use of ports on basic machine learning regression

I have this simple code to do a regression on a list of points very close to a parabole. It is purely anecdotal that I happen to know the exact underlying trend, the idea is just to have simple/nice ...
• 466
1 vote
103 views

### NonLinearModelFit giving unidentifiable error message

So I am relatively new at fitting data on Mathematica, but I am currently trying to do a Nonlinear model fitting to the data below, but it keeps giving me the error "...
• 13
39 views

### How to fit with constraints?

I have a curve defined by sp(r) with r in [0,1], and I would like to fit a degree 6 polynomial pol(r) to this curve under specific constraints. The fitting polynomial must satisfy the following ...
• 101
64 views

### How to form a discrete function using table data

I have table with three column given as $a$, $\alpha_\min$ and $\chi^2$ value respectively. Now a need a function such that we define a function $\alpha_\min$[a_ ], which will order the data table ...
• 57
85 views

### Elegant way with minimal redundancy for handling function parameters and starting values when plotting and fitting

The following code shows how I handle making up a function, finding starting values, fitting and plotting. You see that handling the parameter names, starting values, plotting values is highly ...
• 167
203 views

### How to plot confidence band for Weibull linear fitting?

I have a reliability dataset and want to plot using linear fitting by assuming Weibull distribution. ...
• 1,003
384 views

### Fourier series using DFT

I am trying a simple example to do a discrete Fourier transform. My goal is to use DFT to find the frequencies that have built the time signal and then to a good approximation, use DFT data to find ...
93 views

### How to plot this data set, ignoring the initial oscillation?

Suppose I have an array given as: ...
• 2,688
120 views

### All composite numbers are crossed by the lines

I'm trying a version of the code with the concavity of the parabola upwards (y=x^2), but I'm not succeeding. I appreciate any help. ...
1 vote
75 views

### How to exclude singularities for NMinimize

I have an messy expression and want to apply NMinimize to it, have no idea how to force NMinimize to ignore the singularities it ...
• 346
1 vote
58 views

• 303
1 vote
70 views

### Fitting with Step Function (Beginner question) [duplicate]

I have data as below. ...
• 377
109 views

### NonlinearModelFit extremely slow performance with a single iteration

I have been experiencing very slow performance of NonlinearModelFit. The code that in my case causes that is below. The first part gets the data, the model and ...
• 4,016
1 vote
46 views

### Using NonlinearModelFit output in multiple Plot instances within DynamicModule

I'm creating a script for interactive model fitting where the user selects a 'window' of the data to exclude from the fitting. I can come up with a MWE like the following: ...
213 views

### P-Values For LinearModelFit Changing Due To Ordering Of Features

The arbitrary ordering in a linear model of the independent variables should not impact the p-values for the coefficients of said model. However that is exactly what is happening here ...
414 views

### Finding an ellipse of minimum area that encloses a set of points

Is there a built-in function or set of functions in Mathematica that can take a set of points in the x-y plane and determine the ellipse of minimum area that contains all of the points? I am sure ...
• 1,146
105 views

### Fitting problem for sigmoid like experimental data

I have data like this ...
• 377
201 views

### Curve fitting with Mathematica

I am trying to find de parametric equations of this curve (the curve in that sector of circle): What I've tried: ...
• 183
146 views

...
105 views

### FindFit or NonlinearModelfit for sinusoidal function

I am trying to fit this data set into a specific sinusoidal equation. The equation is shown like this. ...
• 31
558 views

### Dealing with derivative of noisy experimental data

I have the following (time, position) dataset ...
• 159
1 vote
157 views

### The best way to guess the needed data using Mathematica?

I have a question, which is not entirely related to Mathematica, and would appreciate any help on this matter. I have the following dataset, which shows the growth of a bacterium in a specific medium: ...
316 views

### Why does this simple fit run forever?

The following fit runs forever on my laptop; how to speed up? ...
123 views

### Solve constraints don't work properly

So in my previous question, I was trying to find two parameters kV and km for an implicit function using FindFit(FF) command and I did it but the problem is that it takes around an hour to do it. ...
1 vote
57 views

### My sinusoidal fit requires an unused extra constant to work

I am trying to fit a sinusoidal curve onto the following data: ...
131 views

### Problem related to fitting a damped sine function

When I try to fit an exponential damped sine, it acts as if it cannot reach the amplitude at all. What do I change? link to data: datafile Getting data: ...
• 21
1 vote
93 views

### How do I fit unknown function to my data?

I have a set of data, to which I am trying to fit an unknown function. I believe it might be a logarithmic function, but I am not sure. Can you help me find a working model? ...
• 51
84 views

### How can I approximate a function with composite polynomials?

I know that to approximate a function with for example $f(x) = \sin(x)$ using polynomials with degrees up to 4, I can use the Fit function : ...
• 13
1 vote
74 views

### How to include Manipulate in fitting?

I'm trying to fit three differential equations to two data sets, using the code developed by @Cesareo, as follows: ...
234 views

### How can I use option Weights for fitting?

I have the following dataset (time vs. a quantity called $s$): OPD = {{0, 0.0305}, {3, 0.14}, {6, 0.5}, {17, 4.02}, {19, 5.04}, {21, 5.52}, {24, 5.76}}; To the ...
183 views

73 views

### Fitting Chebyshev to 2D data

I have complex data points on a 2D square (say $[0,10]^2$). I tried the following example function: $xye^{i(x+y)}$. I split up the Re and ...
1 vote
I want to fit the following equation $\dot{B} ( t ) = \kappa ( 1 - B ( t ) ),$ to the dataset: $\{ ( 1.17, 0.27 ), ( 2, 0.5 ), ( 4, 0.73 ), ( 6, 0.93 ), ( 8, 1 ), ( 10, 0.93 ), ( 20, 0.8 ) \}$, where ...