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

learn more… | top users | synonyms (1)

14
votes
0answers
549 views

Nonlinear least squares on a GPU with Mathematica 9

Update: A Mathematica wrapper for (https://github.com/zitmen/cuLM) should allow for us to directly implement the Levenberg-Marquardt algorithm in CUDA for nonlinear least squares fitting. In a ...
6
votes
0answers
96 views

Implementation of Partial Least Squares (PLS)?

I'm looking for a PLS implementation for Wolfram Mathematica. I just cant seem to find any implementation for it - do you know one? In general, I'm a bit confused that there exist only so few ...
6
votes
0answers
202 views

Using perpendicular offsets in FindFit

I want to use perpendicular offsets in the built-in FindFit function. Are there any possible ways or do I have to code everything by myself?
5
votes
0answers
110 views

PenaltyFunction Option in NMinimize

I am curious if anybody has some experience in using the built-in Option "PenaltyFunction" in any of the numerical optimization functions like NMinimize. According to the documentation the user ...
5
votes
0answers
212 views

Problems extending NelderMeadMinimize into 2D

Update The eventual route I followed was to adapt a version of the NM-simplex written in C and link to it with MathLink. Once I've tested this out fully I'll post it here. I've been playing around ...
5
votes
0answers
75 views

Third syntax version of LogitModelFit: unexpected result of “BestFit”

The third listed syntax version of LogitModelFit allows one to specify input in a simple way: Only a design matrix (with a row of values of the explanatory input ...
5
votes
0answers
651 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 $$ ...
4
votes
0answers
368 views

What exactly is “ParameterErrors” of NonlinearModelFit?

I am trying to get what I call a "$\chi^2$ fit". This means taking a function $f(x,p)$ of the variable $x$ with a parameter $p$ and finding the value of $p$ that minimizes the "distance" from a data ...
3
votes
0answers
55 views

How to derive SinglePredictionBands from a NonlinearModelFit model

I have found NonlinearModelFit to be extremely useful in my work. Here I have fit 4 points to a function and am being asked to explain how the 95% SinglePredictionBands associated with the plot below ...
3
votes
0answers
153 views

Module in numerical model for NonlinearModelFit is slow and leaks memory

I am trying to make a NonlinearModelFit where the model is the result of a numerical calculation. My code works, but it is very slow and also seems to have a memory ...
3
votes
0answers
272 views

Is it possible to marginalize one or several parameters obtained from fitting procedure?

Statistical model analysis package has a few fitting functions. Their arguments are data points, fitting model and parameters in the fit. The result is a set of best values for parameters, which ...
3
votes
0answers
210 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 ...
2
votes
0answers
36 views

Is there a way to produce a FittedModel object as the solution to a regularized regression?

I can get the Ridge or Tikhonov regression solution to Y = \[Beta].X easily enough as ...
2
votes
0answers
134 views

Memory problem in Mathematica 10

I'm having a problem with memory. I'm doing nonliner fits of several data lists to a system of differential equations. When I evaluate the "Do" cycle the memory grows with the iteration step up to my ...
2
votes
0answers
49 views

Why do EstimatedDistribution and DistributionFitTest work this way

I am fitting some time-series data to both a stable distribution and a normal distribution in order to assess the goodness of fit of each. Along the way I encountered the following confusing result. ...
2
votes
0answers
146 views

NonlinearModelFit is not giving the fit with minimum chi^2

First of all, a bit of background, I am using Mathematica to fit angular distributions of gamma rays, so I apologize for some of the serious messiness in the formulas. The data is simple I have three ...
2
votes
0answers
639 views

Linear regression with x and y errors

I have a question about finding a linear regression weighted with x and y errors. I found the answer provided by 0x4A4D in Estimate error on slope of linear regression given data with associated ...
2
votes
0answers
255 views

NonLinearModelFit with Two Dimensional List of Weights

I'm currently trying to fit Planck's law (B[λ, T]) to measurements, thereby determining Planck's constant. I have a list of triplets containing wavelength, ...
2
votes
0answers
637 views

ParametricNDSolveValue or NDSolve + fitting

I have been trying to find the value for the parameter kestim that yields the best fit of a model to some data points. datac has ...
2
votes
0answers
208 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: ...
1
vote
0answers
60 views

Fitting curves with NonLinearModelFit not working with charge and discharge like data

I'm trying to get a reasonable fit out of mathematica, but i'm not very practical with it. I'm not that good with mathematica at all actually(like cleaniness of the code...). btw, here's my problem: ...
1
vote
0answers
31 views

Error associated with parameters in Minimize (or NMinimize) in discrete fitting

my problem goes as follows: I need to a discrete fit of a discrete function. Say I have the following made up data points, which are generated by the parabola ...
1
vote
0answers
59 views

Updating procedural fitting algorithm to more efficient style?

For some time now, I have used this procedural programming approach to fit data in my research that is too cumbersome for the built in Mathematica functions. (Although this simple example works fine ...
1
vote
0answers
66 views

Simultaneous fitting to multiple data sets with multiple variables and some common parameters

I am trying to fit two data sets to a function model described below which share a few common parameters. Say I have two functions with some common parameter(s) ...
1
vote
0answers
42 views

Plots to check all assumptions of linear regression

I'm running a linear regression with LinearModelFit and would like to plot graphs to check the assumptions of linear regression: linearity, independence of the ...
1
vote
0answers
80 views

Comparing two ways of fitting systems of ODEs to data

I'd like to ask you if you see any difference between the two following ways of estimating parameters. Given my system of ordinary differential equations that I want to use to find the values of all ...
1
vote
0answers
61 views

Cross-validation of a FittedModel

Although I would know how to perform cross-validation tests after fitting a model using a function like NonLinearModelFit, I wonder if there is a way to do this providing the right parameters to the ...
1
vote
0answers
133 views

Developing easy code to apply Delta Method to generate prediction bands for custom distributions

I think that this is an interesting issue for all those who when to not only adjust one prediction function, but also to obtain the prediction bands to asses the graphical or tabular error I'm trying ...
1
vote
0answers
41 views

A more efficient way of fitting a non-linear model that returns an entire list?

I have a function that takes two parameters, del and nu, and returns a list npoints long ...
1
vote
0answers
270 views

Speeding up Nonlinearmodelfit by constraining parameters?

I have a complicated parametric PDE that can be fitted to some data with NonlinearModelFit, but takes several hours to estimate the best values of the four free parameters. Currently, the code ...
1
vote
0answers
142 views

LeastSquares with some parameters missing

I want to do a partial least squares (PLS) regression using LeastSquares on my data. The input parameters are temperature, humidity and pressure for a given date. ...
1
vote
0answers
95 views

Can we ask ComponentMeasurements to use NonLinearModelFit to return a covariance matrix for underlying intensity data?

I'd like to be able to calculate a covariance matrix for some data underlying a morphological component. Provided this data, I can write something like: ...
1
vote
0answers
725 views

How to Output Chi-Squared Statistics when using NonLinearModelFit

I am using NonLinearModelFit for some curve fitting and I was wondering if NLM is able to output chi-squared/leastsquared statistics from the best-fit parameters and confidence intervals. From my ...
1
vote
0answers
224 views

To what extent can NonlinearModelFit be sped up?

Can NonlinearModelFit be parallelized or compiled to allow one to achieve a scalable speedup for a fitting procedure? Attempting to use this function to fit a ...
0
votes
0answers
16 views

Binomial Regression where n > 1

I am not well versed in Generalized Linear Models, but am trying to use this approach to model some discrete data. I have binomial data where the sample size for each observation is the same size, ...
0
votes
0answers
36 views

Troubles with FindFit for ODE (elaboration)

I have asked a question Troubles with FindFit for ODE and get a good-working answer from @belisarius. Nevertheless I need to clarify is it possible to define the same model with ...
0
votes
0answers
47 views

NonlinearModelFit indeterminate or not a list of real numbers

I'm trying to fit my data using NonlinearModelFit but keep getting errors that I don't quite understand how to correct ...
0
votes
0answers
37 views

Using List/Histogram Data As A Weighted Function?

I have a list of data points that I would like to use as a weighted fucntion. The data represents the number of particles within a bin of a particle distribution. Ultimately I would like to multiply ...
0
votes
0answers
83 views

Non linear curve fit

I am trying to fit a non linear curve to my data which looks like following The code I am using is following. You can see I have six unknown variables ...
0
votes
0answers
52 views

Can not understand the code to join points into line segments

I'm reading the CDF file from Making Formulas… for Everything in wolframalpha blog. It's hard for me to understand the In[17] code of function pointListToLines. I especially want to know what the use ...
0
votes
0answers
82 views

Multi-peak fitting

Suppose we have a data set that looks like this: I have to fit this data to 9 peaks knowing μ and σ beforehand & have to ...
0
votes
0answers
37 views

How to perform a distribution fit test to censored data

With following code I will get an error: ...
0
votes
0answers
79 views

Curve fitting of a list

I have list obtained using an integrals. I want to obtain an analytical formula that fits my list using curve fitting. Please suggest a simple analytical structure that fits my curve. ...
0
votes
0answers
54 views

Using FindFit to return a list of possible best fits

Can I use some variant of FindFit that will return a list of the best fit and some worse fits, not just the best fit? This is for a function where the residual function can have several local ...
0
votes
0answers
53 views

Fitting a plane from a set of (x,y,z) values with uncertainties on 3 variables

I would like to fit a plane from a set of measurements (x,y,z) with uncertainties on the 3 variables. Currently I am using the command "LinearModelFit" that computes the best plane but I have a ...
0
votes
0answers
48 views

Convergence Problem using FindFit

I have the following input where there is a convergence problem in the FindFit as shown in the attached figure.The figure shows 2 plots: one of the real data and the other of the fitted line. Any ...
0
votes
0answers
116 views

Fit convoluted Gaussian and Lorentzian functions to a peak profile

Thanks in advance for anyone who read this. I have a peak profile data like this: ...
0
votes
0answers
61 views

No real number fitting double exponential in Mathematica

I am trying to fit a double exponential curve to my data, but I got the error saying there are non real number. Also I tried with starting values for my 4 parameters, but this does not work either. ...
0
votes
0answers
87 views

Horizontal shift in fitting data by a sinusoidal nonlinear model

I have data that can apparently be fitted by a sinusoidal function in form $D+A\sin(B(x-\frac CB))$. I tried doing the best fit in Mathematica using ...
0
votes
0answers
48 views

How do I constrain the result of fitting my non-linear model to be greater then 0

fitresulty21 = NonlinearModelFit[ydata21, {funfit[y, σ, A, B, x1, d, d/2], A > 0}, {{x1, 20}, {σ, 3}, {A, 200}, {B, 2000}, {d, 110}}, y]; ...