Skip to content

Commit 391f5fd

Browse files
aloctavodiaColCarroll
authored andcommitted
add deprecation warning BPIC and DIC (pymc-devs#2754)
* add deprecation warning BPIC and DIC * fix typo * do not hide warning messages
1 parent 2145758 commit 391f5fd

File tree

4 files changed

+232
-533
lines changed

4 files changed

+232
-533
lines changed

RELEASE-NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
- Michael Osthege added support for population-samplers and implemented differential evolution metropolis (`DEMetropolis`). For models with correlated dimensions that can not use gradient-based samplers, the `DEMetropolis` sampler can give higher effective sampling rates. (also see [PR#2735](https://github.com/pymc-devs/pymc3/pull/2735))
1616
- Forestplot supports multiple traces (#2736)
1717
- Add new plot, densityplot (#2741)
18+
- DIC and BPIC calculations have been deprecated
1819

1920
### Fixes
2021

docs/source/notebooks/GLM-model-selection.ipynb

Lines changed: 150 additions & 380 deletions
Large diffs are not rendered by default.

docs/source/notebooks/model_comparison.ipynb

Lines changed: 74 additions & 152 deletions
Large diffs are not rendered by default.

pymc3/stats.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ def dic(trace, model=None):
116116
z : float
117117
The deviance information criterion of the model and trace
118118
"""
119+
warnings.warn("dic has been deprecated. Use `waic` or `loo` instead.", DeprecationWarning,
120+
stacklevel=2)
121+
119122
model = modelcontext(model)
120123
logp = model.logp
121124

@@ -464,6 +467,9 @@ def bpic(trace, model=None):
464467
z : float
465468
The Bayesian predictive information criterion of the model and trace
466469
"""
470+
warnings.warn("bpic has been deprecated. Use `waic` or `loo` instead.", DeprecationWarning,
471+
stacklevel=2)
472+
467473
model = modelcontext(model)
468474
logp = model.logp
469475

@@ -1005,7 +1011,7 @@ def summary(trace, varnames=None, transform=lambda x: x, stat_funcs=None,
10051011

10061012
def df_summary(*args, **kwargs):
10071013
warnings.warn("df_summary has been deprecated. In future, use summary instead.",
1008-
DeprecationWarning)
1014+
DeprecationWarning, stacklevel=2)
10091015
return summary(*args, **kwargs)
10101016

10111017

0 commit comments

Comments
 (0)