Appropriate Weights in Exponential Fit

조회 수: 16 (최근 30일)
Manish Sharma
Manish Sharma 2020년 9월 25일
댓글: J. Alex Lee 2020년 10월 3일
Hey Everyone,
For each , I have datapoints. is 1-sigma error of each respective point. Imagine arrays x contains all , y contains all and E contains all .
Now varies with in an exponential (decay) manner. My confusion relies on defining the "weight" parameter in exponential fit. I read online that for each datapoint can be defined (called inverse variance weighting). Is this the correct approach?
I am confused because in my case (due to statistical nature of decay) is generally decreasing as is increasing; which essentially means giving more weights to the rigthmost points which have large relative (/) error. My first thoughts were that the starting data points deserve more weight; as they have less relative error (/).
Just confused with how to implement my data right in MATLAB using the weight parameter to fit x vs y with errors in E.
Thanks,

답변 (1개)

J. Alex Lee
J. Alex Lee 2020년 9월 25일
The choice of weighting is unrelated to the computing platform...
If you want to use an inverse variance weighting strategy, to your point, you could scale the errors by their means, then
But practically, have you just run your fitting with different weightings to see if you get results that differ by amounts that you care about?
  댓글 수: 4
Manish Sharma
Manish Sharma 2020년 10월 3일
Hi J. Alex,
Attached is a simplistic example. In my case instead of 20, I have several points. Such that changing from 1 to any value changes my final value significantly. The is error in y.
If you notice the error is higher for initial points. But initial points are more trustworthy as the source is stronger initially; hence better statistics. As time passes, the source weakens (exponentially) so the error also decreases.
So, if I use ; I actually give less weights to the initial points which I think may be wrong. Any take?
Any suggestions, why not or anything else for example?
J. Alex Lee
J. Alex Lee 2020년 10월 3일
As for what is reasonable, looking at (dy/y) gives consistently about 0.015 and doesn't change much, so weighting by (y/dy) (or any of its powers) would roughly be like not weighting at all. Even weighting by 1/dy, your errors are so small and change by so little compared to the y value themselves, that it really shouldn't matter.
Your problem (why it actually does matter in practice) probably has to do with the model you are trying to fit. Are you fitting
or
or something else?
Based on looking at the data and playing around with fits, I assume you are using a model with an offset ( c ), and you are concernt that the offset value is sensitive to your weighting strategy.
But look at your data, it doesn't actually taper much to suggest that you should have any offset. So of course you can get almost arbitrary values of offset that still reasonably describe your data well, but it looks like you'll get visually indistinguishable fits over the domain of the data (from 0<x<20) no matter how you weight.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by