Questions on the use of Mathematica to construct models for approximating empirical data. (FindFit[], Fit[], LinearModelFit[], NonlinearModelFit[], etc.)

learn more… | top users | synonyms (1)

0
votes
0answers
153 views

NonlinearModelFit:cvmit: Failed to converge to the requested accuracy or Precision within 1000 iterations

I am trying to find some parameters from a model using NonlinearModelFit, but I always get the same error: NonlinearModelFit:cvmit: Failed to converge to the ...
30
votes
4answers
834 views

How to visualize 3D fit

I have a data set of x,y,z values and I fit a function of x,y to the data. This works, but I can't come up with a nice way to ...
6
votes
1answer
193 views

Fix end point in smooth kernel distribution density

I am using some extreme value fitting method which results in a parametric distribution for values exceeding some threshold, all values $\geq 0$. For smaller values I'd like to use a smooth kernel ...
0
votes
0answers
235 views

Gaussian processes for machine learning [closed]

What solutions are there for Gaussian process regression and classification in Mathematica? Examples are gratefully received.
1
vote
0answers
167 views

fit using parametric equations

I have experimental data with two columns (x & y). I need to fit the data to two parametric equations of the form $$y =\text{const}_1 \times \left( \frac{\int _a^{b}\sqrt{\frac{\left( 1+\gamma ...
2
votes
1answer
246 views

Combined fitting via NonlinearModelFit

I am trying to fit my data to a combined function model. Say I have two functions with some common parameter(s) f[x_]:= a*x^2 + b*x + c g[x_]:= d*x^2 + e*x + c ...
-1
votes
1answer
177 views

Multivariate Function Approximation With a Large Dataset

I have a nice amount of data from a trading strategy I am working on, where I have two different liquidity parameters as x, y variables. Before entering a trade I am taking the moving average of ...
1
vote
1answer
222 views

Having Trouble Fitting Complicated Exponential Function with FindFit

I am working on high pressure shock experiments and am trying to figure out a the temperature of a sample under strong shocks. I have a measure value from 4 wavelengths of a pyrometer and am using a ...
12
votes
3answers
580 views

Finding a fit to a multi-dimensioned function

I have a model function $f:\mathbb{R}^2\rightarrow\mathbb{R}^2$, and a bunch of data points for which I'd like Mathematica to fit for me. Unfortunately FindFit ...
1
vote
0answers
118 views

Data fitting using a model based on Eigensystem [closed]

Background (for interest/flavour): I'm writing a routine to extract certain physical parameters from a set of x-ray spectroscopy data. There are 7 parameters to be fitted; 3 (Dq, Dsigma, Dtau) relate ...
2
votes
1answer
146 views

Problem creating MeanPredictionBands

I have a problem creating MeanPredictionBands for my function which I fitted using NonlinearModelFit. I have a complex-valued ...
4
votes
1answer
231 views

Time approximation of decrypting RSA algorithm

I've written a function that encrypts a text using the RSA algorithm. It then decrypts it using prime factorization, and takes the time it took to decrypt it and puts it in a vector together with the ...
8
votes
3answers
443 views

Ηow to create an interpolated CDF from its samples?

I want to use a distribution I have only aggregate statistics on, namely its CDF sampled at certain points. I would like to keep it "nonparametric" (remain noncommittal on the parametric form), but I ...
3
votes
1answer
144 views

Getting slightly different results in fitting a logit model in R and Mathematica

I'm fitting some data to a Logit model in both Mathematica and R and I'm getting slightly different results. R code: ...
0
votes
0answers
251 views

Find parameters to fit data with a function

I have a question regarding to find parameters (k1 & k2) to fit functions. At the beginning, I guessed ...
5
votes
2answers
338 views
3
votes
1answer
407 views

How do I find the best parameter to fit my data if the model is a interpolating function?

Hi I have a question regarding to find the best parameters for my model to fit my data. I have 3 ordinary equation, and I now just picked some parameters (...
2
votes
0answers
468 views

FindFit vs. NonlinearModelFit [closed]

Would anybody be able to elaborate on the difference between FindFit and NonlinearModelFit. I couldn't find any documentation ...
3
votes
0answers
154 views

Mathematica Complains about Non Symmetric Covariance matrix, when it's not the case

I was doing some fitting with Mathematica7 using NonlinearModelFit. It's quite long the program to do the fit and that's why I am not displaying here ... It goes ok, and I can get the fit parameters ...
1
vote
1answer
313 views

How to find local minima of a multivariate function with singularity?

I am working on a logistic regression problem which requires minimizing a cost function J[{theta0, theta1, theta2}, X, y] to find the optimal value for fitting ...
5
votes
3answers
544 views

Finding the linear regression of data and plotting it

This is for a physics report that I have to hand in. I have a list of two-dimensional data points that approximately form a linear line. I want to: calculate the best linear fit. put both data ...
4
votes
1answer
472 views
5
votes
0answers
229 views

NonlinearModelFit weights

I would like to know how to perform a nonlinear regression on a table with measurement errors. The table consists of two columns, and both have errors. I've been watching some tutorial and it is very ...
7
votes
4answers
826 views

Can one force a linear regression fit to go through the origin?

As the question says, can one force a fit through the origin $(0,0)$ as one can when fitting a trendline to your data in MS Excel? If so, how do you do that?
10
votes
1answer
736 views

Fitting a spline to data with FindFit?

I am trying to find a function that fits my almost linear data. A high order polynomial model has too much residual. So I was hoping to use Mathematica to fit splines to the curve. This is what I ...
10
votes
3answers
692 views

How to use FindFit to fit an implicit function?

Now I am trying to fit some data with a implicit model function. Firstly, I tried a toy example. Toy example with input and output ...
11
votes
4answers
2k views

Using FindFit to fit $a\,b^t$: how to avoid introducing complex numbers?

I'd like to find a model $f(t)=a\,b^t$ which matches the following data ...
6
votes
2answers
491 views

FindFit returns worse result when putting constraints on parameters

I want to fit some data to a model of exponential decay using the FindFit function: ...
5
votes
2answers
620 views

NonlinearModelFit Problem

I have some problems with the NonlinearModelFit: NonlinearModelFit[data, A (1 + Cos[a x]) + B (1 + Cos[b x]) + c , {A, B, a, b, c}, x] The model should fit my ...
11
votes
2answers
411 views

Trying to fit an unknown extreme distribution

First up, I'm quite new to Mathematica so any hints on better code would be greatly appreciated. I have some histogram frequency data from an unknown distribution that I'm trying to fit. Here's the ...
16
votes
3answers
849 views

Data fitting with Image processing feature detection

I have some 2D data that once plotted looks like the following ...
3
votes
5answers
421 views

How to plot Fit functions?

If I do something like this f[x_]:=x^2 Plot[f[x],{x,1,10}] Mathematica plots the function $f(x)=x^2$, as expected. However, ...
0
votes
3answers
273 views

Creating simple procedure for The Least-Square $m^\text{th}$ Degree Polynomials

I am CS major, taking Computational Numerical Analysis course. Instructor gave us freedom of choice, we were allowed to use anything or any computer language we picked, I picked Mathematica.This is my ...
2
votes
0answers
159 views

How to predict some constant number of values with NeuralNetworks

Example: << NeuralNetworks` data = {Sin[#]} & /@ Range[0, 4 Pi, 0.5]; learn = data[[1 ;; 15]]; Now, lets fit our neural network: ...
3
votes
1answer
296 views

Why FindFit could not exactly fulfill condition?

I tried to fit some data with boundary conditions, but FindFit just could not work. Does anyone know the reason? Details: The function to be fitted is ...
15
votes
2answers
625 views

Finding the area, algebraic curve and jaggedness of an arbitrary shape

I start with a photograph of a shape (physically made by the flow of a liquid into another), of which I can extract the border, manually or using Mathematica's feature detect feature : Using the ...
24
votes
4answers
2k views

Simultaneously fitting multiple datasets

What is the proposed approach if one wants to simultaneously fit multiple functions to multiple datasets with shared parameters? As an example consider the following case: We have to measurements of ...
4
votes
3answers
387 views

Output of NonlinearModelFit differs from the correct result

I'm having a bad time dealing with the NonlinearModelFit in Mathematica 8, since the result given is a bit imprecise. An example is given on potential regression, ...
10
votes
2answers
256 views

Unexpected differences with various uses of NormFunction

I would expect all of the following to give the same answer (2.12467) but only half of them give this answer. The others seem to be using the default ...
2
votes
2answers
221 views

Non-linear trend reduction with missing data

How can I reduce a non-linear trend of some data series if there are parts of "no data", represented by the value 99999? For example: ...
5
votes
2answers
232 views

How to find Matano plane

I have discrete collection of data points (10 to 10^4). I want to describe them by a continuous function and find a x value z, ...
14
votes
2answers
579 views

FindFit returns Infinity::indet error when data contains {0,0}

Let's consider the following data: data = Table[{q, 2*q^2}, {q, 0, 2}]; and then, do a very simple fitting to this data: ...
14
votes
3answers
772 views

Mathematica envelope for the bottom of a plot, a generic function

I have the following set-up: xaxis = Table[x, {x, 0, 10, 0.01}]; yaxis = Table [Sin[x] + Abs[RandomReal[{-1, 1}]], {x, 0, 10, 0.01}]; ListLinePlot[Transpose[{ xaxis, yaxis}]] My ...
11
votes
4answers
2k views

Problem with NonlinearModelFit

I'm having trouble with a non-linear fit: fit = NonlinearModelFit[data, y0 + A Sin[\[Pi] (x - xc)/w], {y0, xc, A, w}, x] where ...
4
votes
0answers
458 views

Analytical model fitting

I have a special type of model fitting problem that I am trying to solve in Mathematica. Any insight how to attack it using available tools of Mathematica will be great to hear. We have a variable $$ ...

1 2