Questions tagged [data-fitting]

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

853 questions
-2
votes
1 answer

Fitting the data with a voigt function in python

I am trying to fit my data with a Voigt function. I used the code given below. But the fit is not there with a right range.. and I do not know how to set the range to fit. Can anyone help me pls? import numpy as np import matplotlib.pyplot as…
Zen
  • 83
  • 2
  • 9
-2
votes
2 answers

Python gaussian fit with same color as bars of histogram

I use the functions plot() and hist() from pyplot (without any color definition) to generate the following graphic: There will be even more data sets included. That's why I want to use the same color for fit curve and the related histogram, to keep…
-2
votes
1 answer

Distribution fitting using various criteria in R

Consider me to be an undergraduate student doing a routine research study. Is there a simple, straight forward way to find and access (or implement) distribution fitting in R using the following estimates: Kolmogorov-Smirnov Minimum Distance…
-2
votes
1 answer

Function analysis, fitting

I have two datasets, which I would like to find the best fitting function types: x <- c(10, 40, 70, 100, 130, 160, 190, 220) y1 <- c(41.8, 45.2, 50.8, 62.5, 73.2, 86.9, 95.4, 107.9) y2 <- c(1.9, 34.3, 269.2, 1119.4, 2627.1, 5801.2, 11794.8,…
poetyi
  • 236
  • 4
  • 13
-2
votes
1 answer

Matlab figures - remove filling from gaussian distributions

I am emulating a NAND Flash mlc and I am using hist() to display the results which are 4 gaussian distributions. The problem is that I am trying to display 8 distributions at once one the same figure and they overlap. So, I want to find a way to…
gsklias
  • 3
  • 3
-2
votes
1 answer

how do I use nls to estimate parameters?

I want to estimate e50 e0 emax from emax model the equation is Y=E0 + ((DOSE * EMAX)/(DOSE + ED50)) I want to use default algorithm How can I estimate E0 EMAX and E50? I found the example code is : args(nls) function (formula, data =…
user35631
  • 39
  • 1
  • 7
-2
votes
1 answer

Fitting of an image (matrix) to a bounded region in Matlab

I want to fit an image in the bounded space of two circles. Explanation: I am drawing two circles of different radii and I want to fill the space between the two circles with an image. Both circles and the image to be filled in are produced by…
Mushi
  • 367
  • 2
  • 4
  • 14
-3
votes
1 answer

Scipy optimize curve_fit not responding properly

from scipy import optimize import matplotlib.pyplot as plt x_data = np.linspace(0,11,12) y_data = np.array([0.02471114, 0.02057292, 0.01752668, 0.01494543, 0.01273249, 0.0110999 , 0.00946524, 0.00805622, 0.00670716, 0.00558925, 0.00465331,…
willard
  • 3
  • 2
-3
votes
2 answers

use R: fit a set of data with an horizontal line

I have a question about fitting data set. I have a set of data, I want to plot it and add a horizontal line which should be the best fit of it.(let's say it is Y=a and ignore the shape of data) How can I find a? which method i need to use. I prefer…
Julia
  • 111
  • 1
  • 9
-4
votes
1 answer

Python SKlearn fit() monitor TypeError

I want to monitor my gradient boost classifier fit function monitor = make_monitor(10) # a callback funtion gs.fit(Xtrain, ytrain, monitor=monitor) which gives TypeError: fit() got an unexpected keyword argument 'monitor' Any idea how to fix this?
Heinz
  • 1
-4
votes
1 answer

Least Square Fitting Algorithm

I am writing an algorithm in Python to fit a data (I need to write my own algorithm). But I have a problem with the arrays. For example: import math x=[2,1] a=sum([x[i]*x[i] for i in range(len(x))]) It is working. However when I tried to divide, it…
-4
votes
1 answer

Extract fitted values in R

I’m trying to exctract the values from a fitted model. So far I keep getting errors with all the suggestions I could find on the internet. Here is my code plotPoints(absorbance~time,data=a) f1 =…
-4
votes
1 answer

Fit data in Python (sine wave?)

I have data which I would like to visualise. Here is my code: import numpy as np from scipy.optimize import curve_fit xdata = np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]) ydata = np.array([26.2, 27.2, 27.9, 27.9, 27.2, 26.2, 25.3, 24.5,…
paulchen
  • 1,009
  • 1
  • 10
  • 17
1 2 3
56
57