Skip to content

Commit

Permalink
DOC update index, readme and quantile regression example (#94)
Browse files Browse the repository at this point in the history
* DOC update index, readme and quantile regression example

* CLN remove duplicate import and fix typos

* DOC fix more typos
  • Loading branch information
lorentzenchr authored Jul 16, 2023
1 parent 48f9abc commit b868ff4
Show file tree
Hide file tree
Showing 4 changed files with 104 additions and 53 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
Highlights:

- All common point predictions covered: mean, median, quantiles, expectiles.
- Assess model calibration with identification functions (generalized residuals).
- Assess model calibration with [identification functions](https://lorentzenchr.github.io/model-diagnostics/reference/model_diagnostics/calibration/identification/#model_diagnostics.calibration.identification.identification_function) (generalized residuals) and [compute_bias](https://lorentzenchr.github.io/model-diagnostics/reference/model_diagnostics/calibration/identification/#model_diagnostics.calibration.identification.compute_bias).
- Assess calibration and bias graphically
- reliability diagrams for auto-calibration
- bias plots for conditional calibration
- [reliability diagrams](https://lorentzenchr.github.io/model-diagnostics/reference/model_diagnostics/calibration/plots/#model_diagnostics.calibration.plots.plot_reliability_diagram) for auto-calibration
- [bias plots](https://lorentzenchr.github.io/model-diagnostics/reference/model_diagnostics/calibration/plots/#model_diagnostics.calibration.plots.plot_bias) for conditional calibration
- Assess the predictive performance of models
- strictly consistent, homogeneous scoring functions
- score decomposition into miscalibration, discrimination and uncertainty
- strictly consistent, homogeneous [scoring functions](https://lorentzenchr.github.io/model-diagnostics/reference/model_diagnostics/scoring/scoring/)
- [score decomposition](https://lorentzenchr.github.io/model-diagnostics/reference/model_diagnostics/scoring/scoring/#model_diagnostics.scoring.scoring.decompose) into miscalibration, discrimination and uncertainty

:rocket: To our knowledge, this is the first python package to offer reliability diagrams for quantiles and expectiles made available by an internal implementation of isotonic quantile/expectile regression. :rocket:
:rocket: To our knowledge, this is the first python package to offer reliability diagrams for quantiles and expectiles and a score decomposition, both made available by an internal implementation of isotonic quantile/expectile regression. :rocket:

Read more in the [documentation](https://lorentzenchr.github.io/model-diagnostics/).

Expand Down
133 changes: 92 additions & 41 deletions docs/examples/quantile_regression.ipynb

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/examples/regression_on_workers_compensation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@
"source": [
"### 2.2 OLS\n",
"\n",
"Here, we train a Ordinary Least Squares (OLS) model, but on the log transformed target.\n",
"Here, we train an Ordinary Least Squares (OLS) model, but on the log transformed target.\n",
"`TransformedTargetRegressor` takes care of this transformation and also of the back transformation such that predictions are on the original target UltimateIncurredClaimCost."
]
},
Expand Down Expand Up @@ -836,7 +836,7 @@
"source": [
"For a better visual comparison, we use the `diagram_type=\"bias\"` option to rotate the plots by 45 degrees (and mirror on the horizontal line) and plot all models in one go.\n",
"This means, closer to y=0 is better.\n",
"On top, we set the x-axis to a logarithmic scale and we zoom in a little."
"On top, we set the x-axis to a logarithmic scale and zoom in a little."
]
},
{
Expand Down Expand Up @@ -1186,7 +1186,7 @@
"The deciding difference of the scores then stems from the **miscalibration** term.\n",
"Except for the trivial model, the HGBT model has the best (smallest) one.\n",
"The **discrimination** term (larger is better) is quite similar among the non-trivial models.\n",
"Interestingly, the Gamma GLM has a better miscalibration term but a worse discrimination term compared to the Poisson GLM."
"Interestingly, the Gamma GLM has a better miscalibration term, but a worse discrimination term compared to the Poisson GLM."
]
},
{
Expand Down
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
Highlights:

- All common point predictions covered: mean, median, quantiles, expectiles.
- Assess model calibration with [identification functions][model_diagnostics.calibration.identification.identification_function] (generalized residuals).
- Assess model calibration with [identification functions][model_diagnostics.calibration.identification.identification_function] (generalized residuals) and [compute_bias][model_diagnostics.calibration.identification.compute_bias].
- Assess calibration and bias graphically
- [reliability diagrams][model_diagnostics.calibration.plots.plot_reliability_diagram] for auto-calibration
- [bias plots][model_diagnostics.calibration.plots.plot_bias] for conditional calibration
- Assess the predictive performance of models
- strictly consistent, homogeneous scoring functions
- strictly consistent, homogeneous [scoring functions][model_diagnostics.scoring.scoring]
- [score decomposition][model_diagnostics.scoring.decompose] into miscalibration, discrimination and uncertainty

:rocket: To our knowledge, this is the first python package to offer reliability diagrams for quantiles and expectiles made available by an internal implementation of isotonic quantile/expectile regression. :rocket:
:rocket: To our knowledge, this is the first python package to offer reliability diagrams for quantiles and expectiles and a score decomposition, both made available by an internal implementation of isotonic quantile/expectile regression. :rocket:

This package relies on the giant shoulders of, among others, [polars](https://pola.rs/), [matplotlib](https://matplotlib.org), [scipy](https://scipy.org) and [scikit-learn](https://scikit-learn.org).

Expand Down

0 comments on commit b868ff4

Please sign in to comment.