# Tagged Questions

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

19 views

### Quartic function from data

I am studying something about interpolation. I have a function that is a power x function ($f[x\_]:=17000x^{-1.85}$). From this function I got a list with coordinates for X and Y ($data2$) With ...
80 views

### NonlinearModelFit with indexed parameters

I have an instrument calibration problem for a multi-channel instrument. Some of the calibration parameters are common between channels, while others are per-channel. Toy example: ...
55 views

### Get slope of linear fit

This may seem silly, but I've been crazy for the last hour trying to find a way to automate the linear fit of my data. All I need is the slope. Say I have some data ...
3k views

### What is the best distribution for my histogram?

I defined a security bound for a random walk (cube with 15 length) and I have this code to obtain a sample of the random times at which the random walk crosses the boundary for the first time: ...
30 views

### Priority on Fitparameters

I try to fit a function using the FindFit expression. My problem is that ZL has to be ...
50 views

### Surface fitting involving factorial function [on hold]

I have a large data set made up of triples, (x, y, f(x,y)), x, y and f(x,y) are all integers. I don't know the function f(x, y) and my goal is to find (estimate) it. I do know that x can be any ...
40 views

### Plotting a dataset and its fit dynamically

I have the dataset ...
148 views

### Simultaneous plotting

For my experiment, I have to simultaneously fit the real part and imaginary part of cavity reflection data which is given here column 1: frequency, column 2: reflection magnitude, column 3: phase I ...
62 views

### Importing Data to interpolation

I have an external file in extension XLS with looks as follows: This file can be obtained by the link below: Velocidade Angular With certainty this file is generating a list inappropriate for the ...
34 views

### Interpolating data while imposing the behavior of a cumulative distribution function

I would like to interpolate a data set which represents a curve of an empirical cumulative distribution function (CDF). Hence, the y entries are between 0 and 1, continuous and non-decreasing, and at ...
40 views

### FindFit with compiled function [closed]

I try to fit parameters of my experimental data by FindFit. For the model function I use a compiled function, that does numerical calculations. Unfortunately, I get ...
68 views

### polar form of generalized superellipse (not Gielis formula!)

I am looking for the polar form of the following generalized superelliptic shape such that I can use it with NonLinearModelFit for curve fitting to data:  \left |...
68 views

### Predicting the initial conditions of orbits inside a closed curve

I have a data file containing the four orbital element $(x,y,p_x,p_y)$ of a two-dimensional closed loop orbit. Note that the exact implicit equation of the orbit is not known. The plot of the 2D ...
134 views

...
108 views

...
78 views

### Softmax Regression Classification Algorithm

I'm following the Stanford Machine Learning course while simultaneously developing my Mathematica abilities. I'm having issues with my Softmax Classifier implementation (for ref, have a look at these ...
104 views

### Complex Fit, using NMinimize?

I'm having trouble fitting this complex data: ...
35 views

### NonlinearModelFit error: the function value is not a list of real numbers with dimensions {101} at {a,k,m0} = \ {1.,1.,1.} [closed]

So I'm trying to find a sigmoidal fit for my numerical solutions of these two ODEs but I keep getting an error and I don't know how to get around it. Here's my code: ...
638 views

### Fit a function to data so that fit is always equal or less than the data

I have a set of measurement data and I try to fit there a function (a Exp[b x] + c Exp[d x] - o). I have two problems: The fit function does not converge nor ...
88 views

### Data Fitting problem

I'm having this kind of data, and I know what possibly the equation is, i suspect this has a sine equation but the plot not really seems sinusoid. so what possibly the equation is so i can do the ...
34 views

...
118 views

### Nonlinear Fit sometimes does a good job and sometimes doesn't

So I'm trying to fit data, for all my data, the same fitting function can be used. Sometimes the fits actually FIT really well. Sometimes they just look completely random. Here's an example of it ...
57 views

### Solve equations involving summation expressions in Mathematica

I am trying to solve the simple linear regression equation analytically in Mathematica (not using builtin functions). I managed to calculate the gradient as follows f is loss function using RSS and ...
39 views

### Minimization With Complicated Divergent Model [on hold]

I´m trying to use a minimization of a $\chi^2$ function (or similarly a fit) of some data with a complicated function. The problem is that the function has some divergences, and thus the problem ...
52 views

### Using LinearModelFit, how can I test the hypothesis $\beta=c$ with $c\neq 0$?

Assuming a simple linear model $y=x\beta+u$, is there a way to test the hypothesis $\beta=c$ with $c\neq 0$, using the LinearModelFit?
67 views

### FindFit works, NonlinearModelFit doesn't

I have a problem using NonlinearModelFit vs FindFit. Here is my code. ...
117 views

### How to fit this model [closed]

I have such data ...
59 views

### Fitting log-linear data

I am using NonlinearModelFit to extract the gradient of what appears to be linear data in a logplot: ...
3k views

### Fitting fractional complex data with NonlinearModelfit

I've difficulites with the NonlinearModelFit function. In principle Mathematica should be able to deal with complex data. E.g. if I define the following table <...
87 views

### best fitting crossing divides region plots with different background colors

We have two lists: ...
29 views

### data fit using second order PDE

I'm trying to find the parameter for second order PDE using data. i don't know what is the error of that, ...
83 views

### How to calculate unknown parameters

I have measurement data from impact test-test specimen location (Charpy). I am used by the plotting in excel this formula hyperbolical tan Y=y0+a*tanh[(t-x0)/b] ...
65 views

### Linear regression

I have a sequence of data: data = {0.647888, 0.522495, 0.454224, 0.417054, 0.396816, 0.385798, 0.379799, 0.376532, 0.374754, 0.373786, 0.373259, 0.372972} How ...
106 views

### Fitting Three-Dimensional Data with Parameters

I have been trying to fit a model of rate equations to data of three dimensions. The rate equations in my model are as follows. ...
57 views

### Numerical fitting trajectory to model that has NDSolve

I have a model which describes the motion of an object on a plane. ...
89 views

### package for calculating exponent of power law distribution

There are some packages to fitting power law to empirical date in "R", "matlab", "python" Here with maximum likelihood method As it said here. Does it exist similar package in Mathematica?
140 views

### Locally Weighted Linear Regression

I am following the online Stanford Course in Machine Learning and I am trying to implement the algorithms on the fly in Mathematica. Currently, I have issues with minimizing the Locally Weighted ...
31 views

### Use “FindFit” for Multi-variable Polynomial Fit

I'm interested in defining three input vectors: $L=\{L_{1}, \ldots, L_{N} \}$ $W=\{W_{1}, \ldots, W_{N} \}$ $Q=\{Q_{1}, \ldots, Q_{N} \}$ and I'm hoping to be able to input a number for each of ...
185 views

### Fitting data to an Normal Inverse Gaussian distribution

I am using data which I suspect is distributed according to the Normal Inverse Gaussian distribution (NIG). The literature says that the 4 parameters of the NIG distribution can be estimated from the ...
140 views

### Using StepMonitor/EvaluationMonitor with DifferentialEvolution in NMinimize

My question about tracking the progress of a minimisation/fitting process is two-fold: 1. The first part of my question can be considered a slight duplicate/follow-up of this question. There the OP ...
43 views

### importing mortality rates [closed]

In[1]=dataFrance = Import["G:\french female death rates.xlsx"] Out[1]={{{""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {"0 \ 0.003531 "}, {"1 0.000312 "}, {"2 0....
68 views

### forecasting for mortality using a logistic regression

I need to know how to do a forecasting for mortality using a logistic regression, can somebody help? ...
72 views

### Filtering Background with resonance or Peaks

I have some data, the blue curve which I want to filter out the background to get a flat signal with dips(Idea is to divide signal (except the dips) by the background). The orange curve is my best ...
58 views

### How to force a Range on Fit?

I have 1001 points between {x,-5, 5}. I wanted to fit a polynomial over the data but when i try: Fit[Flatten[data], {0, x, x^2, x^4, x^5, x^6}, x] ... the range ...
198 views

### How to measure accuracy of prediction distribution?

I have been trying to come op with a way to test if my dataset follows a Poisson distribution. Normally one would use the DistributionFitTest function, but here is ...
255 views

### Mathematica Interpolation or approximation

I have lists of points X and Y. {1212,1216,1217,1219...}, {1,2,3,4,5,6...} I combine ...
59 views

### Looking for a convenient way to replace a large data sample with an analytic approximation

Suppose that data is a large data sample, and that Histogram[data] produces a very smooth-looking distribution. Since ...
131 views

### How can I fit cyclic experimental curve with a couple of differential equations?

I have an experimental cyclic curve which looks like this: ...