Questions tagged [data-fitting]

Data fitting is to fit a line through a data set i.e. a series of data points.

853 questions
-1
votes
1 answer

Anyway to fit this model to these data points?

I have been tryin to fit these data points to the exponential model y=ae^(px+qx^2). The reason I need this model fit is due to the paper "Temperature dependence of the functional response" by Göran Englund 2011 where they fit this model on data…
-1
votes
1 answer

line passing through a triangulated mesh (MatLab)

I have a triangulated mesh (as in the figure) and I would like to found the line passing trhough the points (see figure). i tried by a 2D fit but I lose the shape of the mesh. Can someone suggest a method to obtain a line as that I drown by hand?
Pierpaolo Croce
  • 57
  • 2
  • 14
-1
votes
1 answer

Fitting a curve

I hope this is the right place to ask this question. I have a curve that I'd like to fit, but I don't know exactly what kind of fitting would be appropriate. The curve is the following: y is converging towards 1 when x grows to infinity. I tried…
hulyce
  • 438
  • 3
  • 15
-1
votes
3 answers

Problem Data Fitting with Square Root function

I try to fit this experimental data with a square root function, using python and the module scipy.optimize. The code for plotting and fitting looks like this. def curve(x, a, b): return np.sqrt(a+b*x) xaxis = np.linspace(30, 1400,…
-1
votes
2 answers

Fit model function out defined data range

Let's say I have a set of data (x=times,y=observation) that have multiple gaps in time. Whatever is the data trend, let's assume it linear for this discussion. During the gaps in time, there is a decay that makes data deviate from the purely linear…
Py-ser
  • 1,860
  • 9
  • 32
  • 58
-1
votes
1 answer

Determining error between two surfaces given same discrete inputs?

I have, as an output of a machine learning algorithm, a surface in z, which has known increments along x and y. These points along x and y match exactly to a surface which I am comparing the output of my algorithm against in order to get a metric of…
-1
votes
1 answer

How can i randomly sample from a distribution already fitted with allfitdist in MATLAB?

I 've found the best fitting of a variable distribution (D(:,2)) using the function "allfitdist". Now i want to save this result in a structure and then i want to randomly sample 10000 times from this result. I'm using this code: [Ddg2 PDdg2] =…
Elisa m
  • 135
  • 8
-1
votes
1 answer

SciPy fitting gives an error

I am fitting my function with experimental data. The function is complicated enough that I am unable to post here, but my fitting module looks like this: out_put = scipy.optimize.leastsq(func, initial parameter, full_output=True, ftol=0.001,…
konstant
  • 685
  • 1
  • 7
  • 19
-1
votes
1 answer

Fitting a gaussian to data with Matlab

I want to produce a figure like the following one (found in a paper) I think it is done using histfit However, histfit doesen't really work with my data. The bars exceed the curve. My data is not really normally distributed but I want all the bins…
Daphnee
  • 47
  • 6
-1
votes
1 answer

With Python, how could I sample a randomly generated data-set to fit a theoretical distribution?

Here is a general example of what I did... Start with a physical model of y=m*x + b Generate uniform distributions of m, x, and b Created a theoretical distribution of y by specifying y_average and y_standard deviation The next step is to sample…
Clay
  • 577
  • 3
  • 8
  • 14
-1
votes
3 answers

How to get a better exponential fit?

How to get a better exponential fit? data.log # +------+-----------+-------+ # | temp | viscosity | error | # +------+-----------+-------+ 303 0.68 0.19 308 0.47 0.13 313 0.33 0.09 318 0.24 …
Andrey
  • 9
-1
votes
1 answer

Assistance with R error message

I am attempting to plot fitted negative binomial results from the count portion of a hurdle regression model. Data (reproducable subset): Age gender familysupport bullying Suicide. SuicideBinary NegBinSuicide 1 -0.771845 0…
Nick
  • 11
  • 2
-1
votes
1 answer

Defining the residuals function between data from array and function: TypeError: unsupported operand type(s) for /: 'int' and 'list'

I have a trouble with defining the residuals function inside my code. This function is further used for leastsq process, but in this case it does not matter. I stared programming recently, so that is why my question may be silly. There is data,…
moshito
  • 11
  • 1
  • 5
-2
votes
2 answers

Fitting Data with Linear Combination of Vectors in MATLAB with Constraints

Working in MATLAB. I have the following equation: S = aW + bX + cY + dZ where S,W,X,Y, and Z are all known n x 1 vectors. I am trying to fit the data of S with a linear combination of the basis vectors W,X,Y, and Z with the constraint of the…
Shane
  • 3
  • 2
-2
votes
1 answer

How do I improve my fit of the double slit diffraction in gnuplot?

I wrote this code to fit the intensity equation of a double slit diffraction over my measured data. The problem is that the fit graph isnt proportional to the plot of the measured data. The measured data is a txt file looking like this: 0 0 10224 1…
Joe Th
  • 9
  • 1
  • 4
1 2 3
56
57