Skip to content

Commit 3e88c8e

Browse files
🚚 Move diagnostics into separate files
1 parent 0bb21fc commit 3e88c8e

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

docs/tutorials/coverage.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@
170170
"source": [
171171
"## Expected coverage\n",
172172
"\n",
173-
"Using the [`expected_coverage_mc`](lampe.diagnostics.expected_coverage_mc) and [`expected_coverage_ni`](lampe.diagnostics.expected_coverage_ni) functions provided by the [`lampe.diagnostics`](lampe.diagnostics) module, we estimate the respective expected coverage of the three estimators. The expected coverage at credible level $1 - \\alpha$ is the probability of a set of parameters $\\theta^*$ to fall inside the highest posterior density \n",
173+
"Using the [`expected_coverage_mc`](lampe.diagnostics.coverage.expected_coverage_mc) and [`expected_coverage_ni`](lampe.diagnostics.coverage.expected_coverage_ni) functions provided by the [`lampe.diagnostics`](lampe.diagnostics) module, we estimate the respective expected coverage of the three estimators. The expected coverage at credible level $1 - \\alpha$ is the probability of a set of parameters $\\theta^*$ to fall inside the highest posterior density \n",
174174
"\n",
175175
"The expected coverage of a posterior estimator $q(\\theta | x)$ at credible level $1 - \\alpha$ is the probability of a set of parameters $\\theta^*$ to be included in the highest density region of total probability $1 - \\alpha$ of the posterior estimator, given an observation $x^* \\sim p(x | \\theta^*)$. If the estimator is callibrated, the expected coverage at credible level $1 - \\alpha$ is exactly $1 - \\alpha$. If it is overconfident, the highest density regions are smaller than they should be, which translates into lower coverages. If it is conservative/underconfident, the highest density regions are larger than they should be and the expected coverages are larger than their nominal level."
176176
]

lampe/diagnostics/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
r"""Diagnostics and reliability assessment."""
2+
3+
from .coverage import *

lampe/diagnostics.py renamed to lampe/diagnostics/coverage.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
r"""Diagnostics and reliability assessment."""
1+
r"""Coverage diagnostics."""
22

33
import torch
44

@@ -8,7 +8,7 @@
88
from typing import Callable, Iterable, Tuple
99

1010
# isort: local
11-
from .utils import gridapply
11+
from ..utils import gridapply
1212

1313

1414
def expected_coverage_mc(

0 commit comments

Comments
 (0)