Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weighted fitting #194

Open
Antoine-DELON opened this issue Sep 10, 2019 · 2 comments
Open

Weighted fitting #194

Antoine-DELON opened this issue Sep 10, 2019 · 2 comments

Comments

@Antoine-DELON
Copy link

The options for fitting include, as reported by the documentation: "If the current page is an average, then the standard deviation from the curves that were used to create the average can be used as weights."

It sounds better to rather use the SEM (standard error of the mean) from the curves to weight the fit. In this case, the reduced khi-2 is expected to fall around the mean value 1 (with some statistical distribution, of course).

Do you agree about this and, if so, can it be fixed?

Regards, Antoine

PS: thx for PyCorrFit which is really a simple but very efficient and well suited FCS soft.

@paulmueller
Copy link
Member

This is certainly possible. The weights are computed directly in the averaging tool (

standarddev = exparray.std(axis=0)[:, 1]
). It would probably make sense to allow the user to choose which weights to use (SD or SEM).

I would rather not like to remove the SD option for backwards-compatibility reasons. In order to make the change, the following tasks would have to be performed:

  • compute both SD and SEM and let user choose which to use for weighting
  • implement loading/saving the new weights in the PyCorrFit session file
  • tests: basic loading and saving in the PyCorrFit session file
  • tests: ensure backwards compatibility (old session files)

@paulmueller
Copy link
Member

Also related to #124, #122.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants