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

Improve WStat implementation #797

Merged
merged 5 commits into from Nov 25, 2016

Conversation

Projects
None yet
2 participants
@joleroi
Contributor

joleroi commented Nov 24, 2016

This PR

  • Extends the WStat docs section to explain everything
  • Make the WStat implementation more similar to how Mathieu implemented it because its much more transparent and elegant (and gives you better access to intermediate results, so you can also be happy @cdeil )

@joleroi joleroi added this to the 0.6 milestone Nov 24, 2016

@joleroi joleroi self-assigned this Nov 24, 2016

@cdeil

This comment has been minimized.

Show comment
Hide comment
@cdeil

cdeil Nov 24, 2016

Member

There's a few typos on the docs page, e.g. formular, unphyisical, distince - PyCharm has a spell-checker. :-)

Member

cdeil commented Nov 24, 2016

There's a few typos on the docs page, e.g. formular, unphyisical, distince - PyCharm has a spell-checker. :-)

@cdeil

I've left some inline comments.
Will have a more detailed look when it's in master.

Show outdated Hide outdated docs/stats/fit_statistics.rst
Show outdated Hide outdated docs/stats/fit_statistics.rst
Show outdated Hide outdated gammapy/stats/fit_statistics.py
Show outdated Hide outdated gammapy/stats/fit_statistics.py
Show outdated Hide outdated gammapy/stats/fit_statistics.py
@joleroi

This comment has been minimized.

Show comment
Hide comment
@joleroi

joleroi Nov 25, 2016

Contributor

PyCharm has a spell-checker. :-)

Vim too 😉

Contributor

joleroi commented Nov 25, 2016

PyCharm has a spell-checker. :-)

Vim too 😉

@joleroi

This comment has been minimized.

Show comment
Hide comment
@joleroi

joleroi Nov 25, 2016

Contributor

I am merging this, let's continue the discussion on master (but IMO the docs/implementation have converged)

Contributor

joleroi commented Nov 25, 2016

I am merging this, let's continue the discussion on master (but IMO the docs/implementation have converged)

@joleroi joleroi merged commit 7ba231e into gammapy:master Nov 25, 2016

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@joleroi joleroi deleted the joleroi:last_wstat_branch branch Nov 25, 2016

@cdeil

This comment has been minimized.

Show comment
Hide comment
@cdeil

cdeil Nov 25, 2016

Member

From: http://docs.gammapy.org/en/latest/stats/fit_statistics.html#poisson-data-with-background-measurement

Intuitively, this log-likelihood ratio should asymptotically behave like a chi-square with m-n degrees of freedom, where m is the number of measurements and n the number of model parameters.

Maybe look at this distribution and compare to the expected distribution some day for one or two simple cases (e.g. PL spectral model with 10 on-off-bins or something like that)?

Member

cdeil commented Nov 25, 2016

From: http://docs.gammapy.org/en/latest/stats/fit_statistics.html#poisson-data-with-background-measurement

Intuitively, this log-likelihood ratio should asymptotically behave like a chi-square with m-n degrees of freedom, where m is the number of measurements and n the number of model parameters.

Maybe look at this distribution and compare to the expected distribution some day for one or two simple cases (e.g. PL spectral model with 10 on-off-bins or something like that)?

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