Closed ricleal closed 6 years ago
Seems to make sense. /cc @jacobq @m93a how does that relate to the other open issues/PR ?
I think this relates to #17 . I did not see that issue before..
Am I understanding correctly that the goal of this proposed feature is to allow some portions of the data to be prioritized over others? For example, if the data being used for fitting was sampled/measured and has some available estimate of uncertainty/error (e.g. Standard Error) then the algorithm should place more emphasis on fitting the points which have higher precision. In other words, we are mainly wanting the fitted result to be within the "error bars" associated with each value.
Edit: If this is the case, then I am pretty sure this is a duplicate, as mentioned above. (Sorry for suggesting that you open a new issue -- I didn't realize what you were asking.)
@jacobq That's it! My fault. I should have seen first the existing issues. I'm closing this one then.
I would be nice to have the uncertainties (e.g. error of the measurement) or weights used as part of the fitting.
Lmfit (https://lmfit.github.io/lmfit-py/model.html) uses it as weights. So when you fit you data you pass
weights=...
. Usually I use the error of the measurement to calculate my weight.weights=1/(y_err))
.For example, data could be like this where
e
is the error associated to the measurementy
:Just an idea for the future.