Appropriate Weights in Exponential Fit
조회 수: 13 (최근 30일)
이전 댓글 표시
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,
댓글 수: 0
답변 (1개)
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
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 Center 및 File Exchange에서 Random Number Generation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!