model-fitting

Fitting SIR model based on least squares

▼魔方 西西 提交于 2020-01-03 02:46:06
问题 I would like to optimize the fitting of SIR model. If I fit the SIR model with only 60 data points I get a "good" result. "Good" means, the fitted model curve is close to data points till t=40. My question is, how can I get a better fit, maybe based on all data points? ydata = ['1e-06', '1.49920166169172e-06', '2.24595472686361e-06', '3.36377954575331e-06', '5.03793663882291e-06', '7.54533628058909e-06', '1.13006564683911e-05', '1.69249500601052e-05', '2.53483161761933e-05', '3

Using R to fit a curve to a dataset using a specific equation

喜夏-厌秋 提交于 2019-12-31 04:24:26
问题 I am using R. I would like to use a specific equation to fit a curve to one of my data sets (attached) > dput(data) structure(list(Gossypol = c(1036.331811, 4171.427741, 6039.995102, 5909.068158, 4140.242559, 4854.985845, 6982.035521, 6132.876396, 948.2418407, 3618.448997, 3130.376482, 5113.942098, 1180.171957, 1500.863038, 4576.787021, 5629.979049, 3378.151945, 3589.187889, 2508.417927, 1989.576826, 5972.926124, 2867.610671, 450.7205451, 1120.955, 3470.09352, 3575.043632, 2952.931863, 349

fitting a L shape (corner) to points to remove outliers

随声附和 提交于 2019-12-25 09:18:24
问题 I am trying to extract the length and width from a set lidar sensor points (pink) as shown in the image below. The points circled in blue and white are actually noise which I wish to eliminated. [The orange box is the length and width I currently have calculated from the points. As seen, the calculated width is much 1/3 wider than it is supposed to be, due to the noisy points i blue and white] I've read some approaches to do corner/rectangle fitting, then discarding x% of the poorest fitting

How to fit multiple parameters to a differential equation in R?

假如想象 提交于 2019-12-24 17:54:54
问题 With a dataset like this time C 0.1 2.6 0.25 4.817 0.5 6.596 0.75 6.471 1 6.049 1.5 5.314 2 4.611 2.5 4.5 3 4.392 4 4.013 5 3.698 6 3.505 8 3.382 12 2.844 14 2.383 24 1.287 I want to fit this data to a model, which is defined as below twocpt <- function(t, Cc, parms){ with(as.list(parms),{ dC0 <- -k01*C0 dCc <- k01*C0 + k21*Cp -(k12+ke)*Cc dCp <- k12*Cc - k21*Cp list(dCc) }) } I took the reference in this page (http://www.inside-r.org/packages/cran/FME/docs/modCost), and developed the

Fitting a two-layer model to wind profile data in python

巧了我就是萌 提交于 2019-12-24 00:45:07
问题 I'm trying to fit a model to my dataset of wind profiles, i.e. wind speed values u(z) at different altitudes z . The model consists of two parts, which I for now simplified to: u(z) = ust/k * ln(z/z0) for z < zsl u(z) = a*z + b for z > zsl In the logarithmic model, ust and z0 are free parameters k is fixed. zsl is the height of the surface layer, which is also not known a priori. I want to fit this model to my data, and I have already tried different approaches. The best result I'm getting so

finding the best/ scale/shift between two vectors

久未见 提交于 2019-12-21 12:25:33
问题 I have two vectors that represents a function f(x), and another vector f(a x+b) i.e. a scaled and shifted version of f(x). I would like to find the best scale and shift factors. *best - by means of least squares error , maximum likelihood, etc. any ideas? for example: f1 = [0;0.450541598502498;0.0838213779969326;0.228976968716819;0.91333736150167;0.152378018969223;0.825816977489547;0.538342435260057;0.996134716626885;0.0781755287531837;0.442678269775446;0]; f2 = [-0.029171964726699;-0

How to estimate the best fitting function to a scatter plot in R?

风格不统一 提交于 2019-12-21 02:51:18
问题 I have scatterplot of two variables, for instance this: x<-c(0.108,0.111,0.113,0.116,0.118,0.121,0.123,0.126,0.128,0.131,0.133,0.136) y<-c(-6.908,-6.620,-5.681,-5.165,-4.690,-4.646,-3.979,-3.755,-3.564,-3.558,-3.272,-3.073) and I would like to find the function that better fits the relation between these two variables. to be precise I would like to compare the fitting of three models: linear , exponential and logarithmic . I was thinking about fitting each function to my values, calculate the

difference between plane segmentation and plane fitting

Deadly 提交于 2019-12-12 03:34:51
问题 I've recently been working on a project in wich I'd have to detect walls, floor and ceiling in a 3D mesh. After doing some research I've been able to detect the floor and some part of the walls using RANSAC algorithms. I was just wondering if anybody could be able to explain the difference between plane-fitting and plane segmentation as they both seem to result into a point cloud containing the floor? 回答1: Plane fitting is generally understood as a pure least-squares based fitting technique

R - Fitting a model per subject using data.table or dplyr

柔情痞子 提交于 2019-12-12 02:16:53
问题 I have a set of observations for many subjects and I would like to fit a model for each subject. I"m using the packages data.table and fitdistrplus , but could also try to use dlpyr . Say my data are of this form: #subject_id #observation 1 35 1 38 2 44 2 49 Here's what I've tried so far: subject_models <- dt[,fitdist(observation, "norm", method = "mme"), by=subject_id] This causes an error I think because the call to fitdist returns a fitdist object which is not possible to store in a