All Questions
Tagged with linearmodelfit or fitting
1,767 questions
2
votes
3
answers
123
views
Fit two dimentional gaussian in dataset
I have a dataset which is a moderately large (1200x1200) array of values. A part of that array has the data that is gaussian along the 2 diagonals. Find the general area of the peak is trivial with a ...
1
vote
0
answers
28
views
Is this a reasonable way to transform simple MSE loss function to weighted MSE for neural networks?
The idea is tested on a dataset with a clear outlier (see picture below)
...
3
votes
1
answer
147
views
How to model time series with Fourier series?
I want to apply Fourier series to a time series and then compare its estimates to the actual values. The data is related to the monthly rainfall of a city from 2000 to 2023. I used the following ...
1
vote
0
answers
63
views
Problem NonLinearModelFit [duplicate]
I am running a two year old notebook it does not recognize the property "MeanPredictionErrors" anymore. It is also not listed in "properties".
On the otherhand "...
1
vote
1
answer
84
views
Trouble using Find Fit function
I'm trying to solve a parameter estimation problem in Mathematica using FindFit. I'm running into an issue where the solution involves complex numbers, which isn't ...
6
votes
3
answers
198
views
"Properties" of FittedModel[...] generated by NonlinearModelFit changes?
As discussed in 77056 finding properties of certain functions can be difficult. I've been using the wonderful StringProperties function provided by @halirutan in ...
3
votes
1
answer
76
views
Fitting the function with appropriate parameters
I am trying to fit the following data with the function f[d, c, tc, t] := d*Exp[-c/Sqrt[t - tc]];
...
3
votes
3
answers
124
views
Is the asymptotic expansion of this table of values $\log_{2}(x!)-.5$? If not, what is the expansion?
Suppose, we have the following code:
...
0
votes
0
answers
46
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 ...
0
votes
0
answers
127
views
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:
...
5
votes
4
answers
369
views
Finding the asymptotic rate of growth of a table of values
Suppose we define entropy[k] where:
...
0
votes
0
answers
49
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.
...
0
votes
1
answer
57
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 ...
1
vote
1
answer
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 "...
0
votes
0
answers
44
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 ...
0
votes
2
answers
68
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 ...
0
votes
1
answer
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 ...
5
votes
2
answers
230
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.
...
3
votes
1
answer
391
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 ...
0
votes
3
answers
97
views
How to plot this data set, ignoring the initial oscillation?
Suppose I have an array given as:
...
0
votes
3
answers
124
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
2
answers
79
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 ...
1
vote
2
answers
60
views
Find a parameter to return minimum of the function of several variables
I have two functions $f_1(n,x)$ and $f_2(n,x)$, and I want them to look similar on the given range $n\in[1,20]$. I can only vary the parameter $x$.
In other words I have a function $F(n,x)=f_1(n,x)-...
4
votes
2
answers
137
views
Fitting Eigenvalues of a 8*8 matrix to experimental data
I have an 8x8 matrix which contains some parameters with a certain range. I am trying to fit the eigenvalues of this matrix to my experimental data with the goal of
having the best fit
extracting the ...
4
votes
1
answer
188
views
Using mathematica to find the equation of curves, by providing images, providing constraints, or both
By "collaborate", I mean to give some instructions or constraints.
Consider the following curves: (as examples, only to illustrate my question in a better way):
Curve (I): Assume it is f ...
0
votes
1
answer
207
views
Fitting a time domain function to frequency domain experimental data
I have an experimental dataset in frequency domain (complex dielectric constant data (K)as a function of frequency of applied signal).
I want to fit it with a function, which is (exponential form) in ...
7
votes
1
answer
116
views
How is the Mathematica command FindGeometricTransformation related to the Kabsch agorithm?
I searched the internet for a Mathematica version of the Kabsch algorithm, using the search terms "Mathematica and Kabsch" nothing came up in. Looking through Mathematica documentation, I ...
0
votes
1
answer
116
views
NonLinearModelFit with multiple y-values for some x-values
I am fitting to a set of measurements, where for some x-values there are multiple datapoints {{x,y1}, ..., {x,y2}...} from different measurements. Is this a problem for Fitting with NonlinearModelFit?
...
1
vote
1
answer
116
views
When using FindFit to fit a large dataset with multiple sine functions, a step size error occur
My dataset looks like
datatandA = Import["dataForQuestionFindFit20240528.csv"];
ListPlot[datatandA]
and the corresponding FFT spectrum looks like
...
0
votes
0
answers
62
views
4
votes
4
answers
223
views
Is there a way to tell FindShortestTour to avoid backtracking when connecting points to form a closed, but possiblely non-convex, curve?
Among a set of points, I want to find a closed curve.
It is not required for the curve to go through all the points, only that the curve goes through as many points as possible. These points are ...
2
votes
1
answer
95
views
Fitting data to a system of ODE using ParametricNDSolveValue
I am trying to create the following code to fit data to a system of ODE.
...
0
votes
0
answers
92
views
How to find a fit for the following data?
Consider the following function:
...
0
votes
1
answer
89
views
Using NonlinearModelFit for fitting equation with two variables and 6 or more Parameters
In the original question posted on 23-04-2024, there was a typo in the numbers given in the nested lists: a superscript symbol (^) was missing in the nested list, i.e, it should have been $9.62948*10^{...
1
vote
1
answer
71
views
Fitting with Step Function (Beginner question) [duplicate]
I have data as below.
...
0
votes
2
answers
114
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 ...
1
vote
1
answer
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:
...
5
votes
1
answer
216
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
...
6
votes
1
answer
422
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 ...
0
votes
0
answers
109
views
Fitting problem for sigmoid like experimental data
I have data like this
...
6
votes
1
answer
208
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:
...
-1
votes
1
answer
146
views
3
votes
2
answers
106
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.
...
4
votes
4
answers
569
views
Dealing with derivative of noisy experimental data
I have the following (time, position) dataset
...
1
vote
2
answers
167
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:
...
3
votes
3
answers
317
views
Why does this simple fit run forever?
The following fit runs forever on my laptop; how to speed up?
...
0
votes
2
answers
133
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
0
answers
62
views
My sinusoidal fit requires an unused extra constant to work
I am trying to fit a sinusoidal curve onto the following data:
...
2
votes
2
answers
138
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:
...
1
vote
2
answers
100
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?
...