Skip to content

added bayesian information criterion and akaike information criterion - #4716

Merged
crawfordsm merged 1 commit into
astropy:masterfrom
mirca:info_theory
Apr 17, 2016
Merged

crawfordsm merged 1 commit into
astropy:masterfrom
mirca:info_theory

Conversation

@mirca

@mirca mirca commented Mar 22, 2016

Copy link
Copy Markdown
Member

Hi all,

This is an attempt to finish up the work started by @astronomeralex at #3700

Basically, these information criterions are used to decided whether increasing the number of parameters in a model truly improves the fitting. Conversely, they are also used to verify whether improvements in fitting are due to the increasing of the number of parameters.

Nice readings about these criterions in an astrophysical context:

In the examples, I tried to show how these information criterions might be used together with astropy fitters.

Appreciate any thoughts.

@cdeil @crawfordsm @astrofrog @hamogu @embray (pinging the ones involved on the old PR).

@eteq

eteq commented Mar 23, 2016

Copy link
Copy Markdown
Member

Some feedback from @jakevdp might also be helpful here?

@jakevdp

jakevdp commented Apr 8, 2016

Copy link
Copy Markdown
Contributor

Looks good – a couple minor comments:

  • It would be useful to have the basic mathematical formula for each in the doc string
  • I believe you could write the ssr version in terms of the standard version – it might be clearer to do this and actually call the standard function from the ssr function
  • It doesn't look like the lsq version of the BIC has any tests
  • For references, if you do e.g. [1]_ rather than [1], hyperlinks will be generated by Sphinx.

@mirca

mirca commented Apr 9, 2016

Copy link
Copy Markdown
Member Author

Hi @jakevdp, thanks!

What does "standard version" stand for? (Root) Mean Square Error?

@jakevdp

jakevdp commented Apr 9, 2016

Copy link
Copy Markdown
Contributor

What does "standard version" stand for? (Root) Mean Square Error?

I just meant that you could call the bayesian_info_criterion function (which contains the standard expression of the BIC) from bayesian_info_criterion_lsq to avoid duplicating logic, as well as to make the connection between them clearer to the person reading the code (and similar with akaike).

@mirca

mirca commented Apr 9, 2016

Copy link
Copy Markdown
Member Author

@jakevdp Sure, understood now, thanks =)

@mirca

mirca commented Apr 9, 2016

Copy link
Copy Markdown
Member Author

Are these failures unrelated with this PR, perhaps?

@bsipocz

bsipocz commented Apr 9, 2016

Copy link
Copy Markdown
Member

@mirca - Could you please rebase? It seems that there are some conflicts, thus the ci doesn't even start.

@bsipocz

bsipocz commented Apr 9, 2016

Copy link
Copy Markdown
Member

(If you haven't done a rebase before and need help, I can assist with in via gitter chat in the next hour or so, or tomorrow.)

@mirca

mirca commented Apr 9, 2016

Copy link
Copy Markdown
Member Author

@bsipocz Thanks =D I did a couple rebases before, I think this seems to be fine too.

@bsipocz

bsipocz commented Apr 9, 2016

Copy link
Copy Markdown
Member

👍

@jakevdp

jakevdp commented Apr 10, 2016

Copy link
Copy Markdown
Contributor

Looks good!


in which :math:`n` is the sample size, :math:`k` is the number of free
parameters and :math:`\mathrm{SSR}` stands for the sum of squared redisuals
between model and data.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you give a reference for this?

@crawfordsm

Copy link
Copy Markdown
Member

Thanks for the review @jakevdp and @bsipocz.

@mirca once small comment and then one request to squash your commits. Thanks for taking care of this!

@mirca

mirca commented Apr 11, 2016

Copy link
Copy Markdown
Member Author

@crawfordsm I think it's all fine here now :)
Thanks again @eteq @jakevdp @bsipocz @crawfordsm

@jakevdp

jakevdp commented Apr 14, 2016

Copy link
Copy Markdown
Contributor

LGTM

@crawfordsm
crawfordsm merged commit 086569b into astropy:master Apr 17, 2016
@mirca
mirca deleted the info_theory branch April 19, 2016 06:41
@pllim pllim mentioned this pull request Feb 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants