Skip to content

Commit

Permalink
DOC add more note links and minor doc improvements (#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
lorentzenchr authored Aug 9, 2024
1 parent f2a02c5 commit a19302b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
9 changes: 5 additions & 4 deletions src/model_diagnostics/calibration/identification.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,12 +527,13 @@ def compute_marginal(
Notes
-----
The marginal values iare computed as an estimation of:
The marginal values are computed as an estimation of:
- `y_obs`: \(\mathbb{E}(Y|features)\).
- `y_pred`: \(\mathbb{E}(m(X)|features)\).
- `y_obs`: \(\mathbb{E}(Y|feature)\)
- `y_pred`: \(\mathbb{E}(m(X)|feature)\)
Computationally that is more or less a group-by operation on a dataset.
with \(feature\) the column specified by `feature_name`.
Computationally that is more or less a group-by-aggregate operation on a dataset.
The standard error for both are calculated in the standard way as
\(\mathrm{SE} = \sqrt{\operatorname{Var}(\bar{Y})} = \frac{\sigma}{\sqrt{n}}\) and
Expand Down
7 changes: 4 additions & 3 deletions src/model_diagnostics/calibration/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def plot_reliability_diagram(
- Optimal selection of bins
- Statistical consistent estimator
For details, refer to [Dimitriadis2021].
For details, refer to `[Dimitriadis2021]`.
References
----------
Expand Down Expand Up @@ -326,7 +326,7 @@ def plot_bias(
identification function, versus a feature. This is a good way to assess whether
a model is conditionally calibrated or not. Well calibrated models have bias terms
around zero.
See Notes for further details.
See [Notes](#notes) for further details.
For numerical features, NaN are treated as Null values. Null values are always
plotted as rightmost value on the x-axis and marked with a diamond instead of a
Expand Down Expand Up @@ -386,9 +386,10 @@ def plot_bias(
Notes
-----
[](){#notes}
A model \(m(X)\) is conditionally calibrated iff \(E(V(m(X), Y))=0\) a.s. The
empirical version, given some data, reads \(\frac{1}{n}\sum_i V(m(x_i), y_i)\).
See [FLM2022]`.
See `[FLM2022]`.
References
----------
Expand Down

0 comments on commit a19302b

Please sign in to comment.