Y fit error for weighted levenberg marquart algorithm

1 次查看(过去 30 天)
I am using the weighted levenberg marquard algorith, and I want to calculate the error for each fitted x value. I have a vector of x data, a vector of y data, and a vector of standard deviation of the y data. Each vector has n points. For each data point there were several measurements (at the same value of x), so I calculated the stdev of these y values (at each x value). The wights are 1/ stdev_ymeasured^2.
After performing the fit, how can I calculate the error (or the uncertainty of the fit) for each input value of x. The fit is obviously a smooth line, but the uncertainty should vary along it, both because the weights are not equal and because the residuals at each point are different.
I tried using eqn. 19 from this page: http://people.duke.edu/~hpgavin/ce281/lm.pdf but the dimentions of W are wrong; I assume W is a 1*n matrix, with each entry wi being the weight for each x value. Also, I am total unclear as to what sigma_y^2 is supposed to be. Is there a better/different way to calculate the uncertainty? If this formula is appropriate, what is the matrix W actually supposed to be?
Thanks
  1 个评论
chu li
chu li 2020-3-10
Hello, now i'm tring to implement the weighted levenberg marquard algorithm. But i don't know how to add the weight to the fitting program. Can you show the program of weighted levenberg marquard algorithm? Thank you very much.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Problem-Based Optimization Setup 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by