Replies: 2 comments
-
@ggggggggg Hm, this suggests that our GitHub Issue Templates are not being used, and so need to be updated. We are happy to have discussions about lmfit. And we want to use GitHub Issues only and precisely as a bug tracker. Converting to a discussion. |
Beta Was this translation helpful? Give feedback.
-
@ggggggggg I think that allowing But: That would push the residual to something other than Least-Squares. And using those "reduce" functions are painful because they remove the array-ness of the residuals and replace it with a scalar. That makes the fit much harder. If I understand the
I think it would be better to be able to add an option to
but |
Beta Was this translation helpful? Give feedback.
-
I often fit data from single photon sensing spectrometers with few counts, meaning that I often have bins that have zero or 1 count in them along with bins that have 100s or thousands of counts. The sherpa fitting package for chandra offers the "cash statistic" for this case: https://cxc.cfa.harvard.edu/sherpa/ahelp/cash.html and offers a general method for modifying the fit statistic: https://cxc.cfa.harvard.edu/sherpa/statistics/
As far as I can tell, the closest thing in
lmfit
is thereduce_fcn
argument toMinimizer
. The docs forreduce_fcn
say:So
reduce_fcn
allows the same modifications to fit statistics, but appears limited in the following ways:Model
interface.I think that allowing the use of
reduce_fcn
or similar through theModel
interface and with non-scalar minimizers would be a valuable addition to LMfit. If you like the idea, what would be a good path to do so?Beta Was this translation helpful? Give feedback.
All reactions