curve-fitting

Fit maximum convex hull to interior of a set of points

浪子不回头ぞ 提交于 2021-02-07 09:45:49
问题 I'd like to find the largest convex hull which fits in the interior of a set of points. I have a set of points which are roughly circular, with a large number of outlier points outside of the circle I'd like to fit. Imagine a circle with "solar flares"... I want to fit the circle and completely ignore the flares. I've tried various fit and culling strategies, but they aren't working well. I've searched quite a bit and not found a solution. Thanks in advance. 回答1: The notion you need may be

Fitting logarithmic curve in R

余生长醉 提交于 2021-02-07 06:57:48
问题 If I have a set of points in R that are linear I can do the following to plot the points, fit a line to them, then display the line: x=c(61,610,1037,2074,3050,4087,5002,6100,7015) y=c(0.401244, 0.844381, 1.18922, 1.93864, 2.76673, 3.52449, 4.21855, 5.04368, 5.80071) plot(x,y) Estimate = lm(y ~ x) abline(Estimate) Now, if I have a set of points that looks like a logarithmic curve fit is more appropriate such as the following: x=c(61,610,1037,2074,3050,4087,5002,6100,7015) y=c(0.974206,1.16716

Getting standard error associated with parameter estimates from scipy.optimize.curve_fit

ぃ、小莉子 提交于 2021-02-07 03:00:53
问题 I am using scipy.optimize.curve_fit to fit a curve to some data i have. The curves, for the most part, seem to fit very well. For some reason, pcov = inf when i print it off. What i really need is to calculate the error associated with the parameters i'm fitting, and am not sure how exactly to do this even if it does give me the covariance matrix. The model being fit to is: def intensity(x,R_out,R_in,K_in,K_out,a,b,c): K_in,K_out = abs(0.0),abs(K_out) if x<=R_in: return 2*R_out*(K_out*np.sqrt

Getting standard error associated with parameter estimates from scipy.optimize.curve_fit

别来无恙 提交于 2021-02-07 03:00:41
问题 I am using scipy.optimize.curve_fit to fit a curve to some data i have. The curves, for the most part, seem to fit very well. For some reason, pcov = inf when i print it off. What i really need is to calculate the error associated with the parameters i'm fitting, and am not sure how exactly to do this even if it does give me the covariance matrix. The model being fit to is: def intensity(x,R_out,R_in,K_in,K_out,a,b,c): K_in,K_out = abs(0.0),abs(K_out) if x<=R_in: return 2*R_out*(K_out*np.sqrt

Getting standard error associated with parameter estimates from scipy.optimize.curve_fit

余生颓废 提交于 2021-02-07 03:00:41
问题 I am using scipy.optimize.curve_fit to fit a curve to some data i have. The curves, for the most part, seem to fit very well. For some reason, pcov = inf when i print it off. What i really need is to calculate the error associated with the parameters i'm fitting, and am not sure how exactly to do this even if it does give me the covariance matrix. The model being fit to is: def intensity(x,R_out,R_in,K_in,K_out,a,b,c): K_in,K_out = abs(0.0),abs(K_out) if x<=R_in: return 2*R_out*(K_out*np.sqrt

How to fit a line through a 3D pointcloud?

六眼飞鱼酱① 提交于 2021-02-06 11:41:33
问题 I have a cable I am dropping from moving vehicle onto the ground. Using a camera system I estimate the location where the rope touches the ground in realtime. Movement of the vehicle and inaccuracy in the estimation of the location result in a point-cloud of touchdown locations. From this point cloud, I'd like to obain the most likely path of the cable lying on the ground. I'd like to achieve this in real-time, and I'd like the fit to be updated according to new data. The frequency of new

How to fit a line through a 3D pointcloud?

北战南征 提交于 2021-02-06 11:40:26
问题 I have a cable I am dropping from moving vehicle onto the ground. Using a camera system I estimate the location where the rope touches the ground in realtime. Movement of the vehicle and inaccuracy in the estimation of the location result in a point-cloud of touchdown locations. From this point cloud, I'd like to obain the most likely path of the cable lying on the ground. I'd like to achieve this in real-time, and I'd like the fit to be updated according to new data. The frequency of new

How to return the fit error in Python curve_fit

百般思念 提交于 2021-01-29 17:31:57
问题 I'm trying to fit function to a data set of an experiment using python. I can get a really good approximation and the fit looks pretty good, but the error given for the parameters is incredibly high and I'm not sure how to fix this. The function looks like this: Function The data consist of the a time data set and a y data set. The variable "ve" is a linear velocity function, that's why in the code it is replaced with "a*x+b". Now the fit looks really good and theoretically the function

How to find the area of a function (Pseudo Voigt) using optimized parameters from lmfit?

旧街凉风 提交于 2021-01-29 11:55:07
问题 I am trying to determine the area of a curve (peak). I was able to successfully fit the peak (data) using a Pseudo Voigt profile and a exponential background and get the fitting parameters out which agree with parameters obtained using commercial software. The issue is now trying to relate those fitted peak parameters to the area of the peak. I could not find an simple method of using the fitted parameters to calculate the area of the peak unlike in the case with a Gaussian line shape. So I

Modeling noisy 1/x data in R, getting “essentially perfect fit” from summary - why? [closed]

三世轮回 提交于 2021-01-29 11:14:19
问题 Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 1 year ago . Improve this question Just trying to walk myself through how fitting a reciprocal function to data would go, using the following toy example: # includes library(ggplot2) library(forecast) library(scales) # make data sampledata <- as.data.frame( .1 * seq(1, 20)) names(sampledata) <- c