Skip to content

Commit 99c543f

Browse files
DOC: Put all regression notebooks in the example section (and remove the notebooks_regression one). Mark them as pre-v1.
1 parent 0015039 commit 99c543f

27 files changed

+149
-87
lines changed

doc/index_regression.rst

+1-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@ Prediction intervals (regression)
55
:maxdepth: 2
66

77
choosing_the_right_algorithm_regression
8-
examples_regression/4-tutorials/plot_main-tutorial-regression
9-
examples_regression/4-tutorials/plot_cqr_tutorial
10-
examples_regression/4-tutorials/plot_ts-tutorial
8+
examples_regression/1-quickstart/plot_toy_model
119
examples_regression/index
12-
notebooks_regression
1310
theoretical_description_regression
1411
theoretical_description_conformity_scores

doc/notebooks_regression.rst

-18
This file was deleted.

examples/regression/1-quickstart/plot_compare_conformity_scores.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
"""
2-
===========================================================
3-
Estimating prediction intervals of Gamma distributed target
4-
===========================================================
2+
==========================================================================================
3+
[Pre-v1] Estimating prediction intervals of Gamma distributed target
4+
==========================================================================================
5+
**Note: we recently released MAPIE v1.0.0, which introduces breaking API changes.**
6+
**This notebook hasn't been updated to the new API yet.**
7+
58
This example uses :class:`~mapie.regression.MapieRegressor` to estimate
69
prediction intervals associated with Gamma distributed target.
710
The limit of the absolute residual conformity score is illustrated.

examples/regression/1-quickstart/plot_cqr_symmetry_difference.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
"""
2-
====================================
3-
Plotting CQR with symmetric argument
4-
====================================
2+
===================================================================
3+
[Pre-v1] Plotting CQR with symmetric argument
4+
===================================================================
5+
**Note: we recently released MAPIE v1.0.0, which introduces breaking API changes.**
6+
**This notebook hasn't been updated to the new API yet.**
7+
58
An example plot of :class:`~mapie.quantile_regression.MapieQuantileRegressor`
69
illustrating the impact of the symmetry parameter.
710
"""

examples/regression/1-quickstart/plot_heteroscedastic_1d_data.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
"""
2-
============================================================
3-
Estimate the prediction intervals of 1D heteroscedastic data
4-
============================================================
2+
===========================================================================================
3+
[Pre-v1] Estimate the prediction intervals of 1D heteroscedastic data
4+
===========================================================================================
5+
**Note: we recently released MAPIE v1.0.0, which introduces breaking API changes.**
6+
**This notebook hasn't been updated to the new API yet.**
7+
58
69
:class:`~mapie.regression.MapieRegressor` and
710
:class:`~mapie.quantile_regression.MapieQuantileRegressor` is used

examples/regression/1-quickstart/plot_homoscedastic_1d_data.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
"""
2-
==========================================================
3-
Estimate the prediction intervals of 1D homoscedastic data
4-
==========================================================
2+
=========================================================================================
3+
[Pre-v1] Estimate the prediction intervals of 1D homoscedastic data
4+
=========================================================================================
5+
**Note: we recently released MAPIE v1.0.0, which introduces breaking API changes.**
6+
**This notebook hasn't been updated to the new API yet.**
7+
58
69
:class:`~mapie.regression.MapieRegressor` and
710
:class:`~mapie.quantile_regression.MapieQuantileRegressor`

examples/regression/1-quickstart/plot_prefit.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
"""
2-
===========================================================================
3-
Example use of the prefit parameter with neural networks and LGBM Regressor
4-
===========================================================================
2+
==========================================================================================================
3+
[Pre-v1] Example use of the prefit parameter with neural networks and LGBM Regressor
4+
==========================================================================================================
5+
**Note: we recently released MAPIE v1.0.0, which introduces breaking API changes.**
6+
**This notebook hasn't been updated to the new API yet.**
57
68
:class:`~mapie.regression.MapieRegressor` and
79
:class:`~mapie.quantile_regression.MapieQuantileRegressor`

examples/regression/1-quickstart/plot_toy_model.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
"""
2-
======================================================
3-
Plotting MAPIE prediction intervals with a toy dataset
4-
======================================================
2+
=====================================================================================
3+
[Pre-v1] Plotting MAPIE prediction intervals with a toy dataset
4+
=====================================================================================
5+
**Note: we recently released MAPIE v1.0.0, which introduces breaking API changes.**
6+
**This notebook hasn't been updated to the new API yet.**
7+
58
An example plot of :class:`~mapie.regression.MapieRegressor` used
69
in the Quickstart.
710
"""

examples/regression/2-advanced-analysis/README.rst

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
.. _regression_examples_2:
22

3+
-----
4+
35
2. Advanced analysis
46
--------------------
57

examples/regression/2-advanced-analysis/plot-coverage-width-based-criterion.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
"""
2-
================================================
3-
Estimating coverage width based criterion
4-
================================================
2+
===============================================================================
3+
[Pre-v1] Estimating coverage width based criterion
4+
===============================================================================
5+
**Note: we recently released MAPIE v1.0.0, which introduces breaking API changes.**
6+
**This notebook hasn't been updated to the new API yet.**
7+
58
This example uses :class:`~mapie.regression.MapieRegressor`,
69
:class:`~mapie.quantile_regression.MapieQuantileRegressor` and
710
:class:`~mapie.metrics` is used to estimate the coverage width

examples/regression/2-advanced-analysis/plot_both_uncertainties.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
"""
2-
================================================
3-
Estimating aleatoric and epistemic uncertainties
4-
================================================
2+
===============================================================================
3+
[Pre-v1] Estimating aleatoric and epistemic uncertainties
4+
===============================================================================
5+
**Note: we recently released MAPIE v1.0.0, which introduces breaking API changes.**
6+
**This notebook hasn't been updated to the new API yet.**
7+
58
This example uses :class:`~mapie.regression.MapieRegressor` and
69
:class:`~mapie.quantile_regression.MapieQuantileRegressor` to estimate
710
prediction intervals capturing both aleatoric and epistemic uncertainties

examples/regression/2-advanced-analysis/plot_conditional_coverage.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
"""
2-
===============================
3-
Estimating conditional coverage
4-
===============================
2+
==============================================================
3+
[Pre-v1] Estimating conditional coverage
4+
==============================================================
5+
**Note: we recently released MAPIE v1.0.0, which introduces breaking API changes.**
6+
**This notebook hasn't been updated to the new API yet.**
7+
58
This example uses :func:`~mapie.regression.MapieRegressor` with conformal
69
scores that returns adaptive intervals i.e.
710
(:class:`~mapie.conformity_scores.GammaConformityScore` and

examples/regression/2-advanced-analysis/plot_conformal_predictive_distribution.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
"""
2-
=================================================
3-
Make Conformal Predictive Distribution with MAPIE
4-
=================================================
2+
================================================================================
3+
[Pre-v1] Make Conformal Predictive Distribution with MAPIE
4+
================================================================================
5+
**Note: we recently released MAPIE v1.0.0, which introduces breaking API changes.**
6+
**This notebook hasn't been updated to the new API yet.**
57
"""
68

79
##############################################################################

examples/regression/2-advanced-analysis/plot_coverage_validity.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
"""
2-
================================================
3-
Coverage Validity with MAPIE for Regression Task
4-
================================================
2+
===============================================================================
3+
[Pre-v1] Coverage Validity with MAPIE for Regression Task
4+
===============================================================================
5+
**Note: we recently released MAPIE v1.0.0, which introduces breaking API changes.**
6+
**This notebook hasn't been updated to the new API yet.**
7+
58
69
This example verifies that conformal claims are valid in the MAPIE package
710
when using the CP prefit/split methods.

examples/regression/2-advanced-analysis/plot_nested-cv.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
"""
2-
===========================================================
3-
Nested cross-validation for estimating prediction intervals
4-
===========================================================
2+
==========================================================================================
3+
[Pre-v1] Nested cross-validation for estimating prediction intervals
4+
==========================================================================================
5+
**Note: we recently released MAPIE v1.0.0, which introduces breaking API changes.**
6+
**This notebook hasn't been updated to the new API yet.**
7+
58
69
This example compares non-nested and nested cross-validation strategies for
710
estimating prediction intervals with :class:`~mapie.regression.MapieRegressor`.

examples/regression/3-scientific-articles/README.rst

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
.. _regression_examples_3:
22

3+
-----
4+
35
3. Simulations from scientific articles
46
---------------------------------------
57

examples/regression/3-scientific-articles/plot_barber2020_simulations.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
"""
2-
============================================================
3-
Reproducing the simulations from Foygel-Barber et al. (2020)
4-
============================================================
2+
===========================================================================================
3+
[Pre-v1] Reproducing the simulations from Foygel-Barber et al. (2020)
4+
===========================================================================================
5+
**Note: we recently released MAPIE v1.0.0, which introduces breaking API changes.**
6+
**This notebook hasn't been updated to the new API yet.**
7+
58
69
:class:`~mapie.regression.MapieRegressor` is used to investigate
710
the coverage level and the prediction interval width as a function

examples/regression/3-scientific-articles/plot_kim2020_simulations.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
"""
2-
==================================================
3-
Reproducing the simulations from Kim et al. (2020)
4-
==================================================
2+
=================================================================================
3+
[Pre-v1] Reproducing the simulations from Kim et al. (2020)
4+
=================================================================================
5+
**Note: we recently released MAPIE v1.0.0, which introduces breaking API changes.**
6+
**This notebook hasn't been updated to the new API yet.**
57
68
:class:`~mapie.regression.MapieRegressor` is used to reproduce the simulations
79
by Kim et al. (2020) [1] in their article which introduces the

examples/regression/3-scientific-articles/plot_zaffran2022_comparison.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
"""
2-
======================================================================
3-
Reproduction of part of the paper experiments of Zaffran et al. (2022)
4-
======================================================================
2+
=====================================================================================================
3+
[Pre-v1] Reproduction of part of the paper experiments of Zaffran et al. (2022)
4+
=====================================================================================================
5+
**Note: we recently released MAPIE v1.0.0, which introduces breaking API changes.**
6+
**This notebook hasn't been updated to the new API yet.**
57
68
:class:`~mapie.regression.MapieTimeSeriesRegressor` is used to reproduce a
79
part of the paper experiments of Zaffran et al. (2022) in their article [1]

examples/regression/4-tutorials/README.rst

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
.. _regression_examples_4:
22

3+
-----
4+
35
4. Tutorials
46
------------
57

examples/regression/4-tutorials/plot_ResidualNormalisedScore_tutorial.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
"""
2-
======================================
3-
Tutorial for residual normalised score
4-
======================================
2+
=====================================================================
3+
[Pre-v1] Tutorial for residual normalised score
4+
=====================================================================
5+
**Note: we recently released MAPIE v1.0.0, which introduces breaking API changes.**
6+
**This notebook hasn't been updated to the new API yet.**
7+
58
We will use the sklearn california housing dataset to understand how the
69
residual normalised score works and show the multiple ways of using it.
710

examples/regression/4-tutorials/plot_cqr_tutorial.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
"""
2-
====================================================
3-
Tutorial for conformalized quantile regression (CQR)
4-
====================================================
2+
===================================================================================
3+
[Pre-v1] Tutorial for conformalized quantile regression (CQR)
4+
===================================================================================
5+
**Note: we recently released MAPIE v1.0.0, which introduces breaking API changes.**
6+
**This notebook hasn't been updated to the new API yet.**
7+
58
69
We will use the sklearn california housing dataset as the base for the
710
comparison of the different methods available on MAPIE. Two classes will

examples/regression/4-tutorials/plot_main-tutorial-regression.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
r"""
2-
===============================
3-
Tutorial for tabular regression
4-
===============================
2+
==============================================================
3+
[Pre-v1] Tutorial for tabular regression
4+
==============================================================
5+
**Note: we recently released MAPIE v1.0.0, which introduces breaking API changes.**
6+
**This notebook hasn't been updated to the new API yet.**
7+
58
69
In this tutorial, we compare the prediction intervals estimated by MAPIE on a
710
simple, one-dimensional, ground truth function ``f(x) = x * sin(x)``.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.. _regression_examples_5:
2+
3+
-----
4+
5+
5. Other notebooks
6+
--------------------------------------------
7+
8+
This section lists a series of Jupyter notebooks hosted on the MAPIE Github repository that can be run on Google Colab:
9+
10+
- `[Pre-v1] Estimating the uncertainties of homoscedastic and heteroscedastic noisy data for tabular regression <https://github.com/scikit-learn-contrib/MAPIE/blob/master/notebooks/regression/tutorial_regression.ipynb>`_
11+
12+
13+
- `[Pre-v1] Estimating the uncertainties in the exoplanet masses <https://github.com/scikit-learn-contrib/MAPIE/tree/master/notebooks/regression/exoplanets.ipynb>`_
14+
15+
16+
- `[Pre-v1] Estimating prediction intervals for time series forecast with EnbPI and ACI <https://github.com/scikit-learn-contrib/MAPIE/tree/master/notebooks/regression/ts-changepoint.ipynb>`_
17+

examples/regression/README.rst

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
.. _regression_examples:
22

33
Regression examples
4-
===================
4+
===================
5+
6+
Following is a collection of notebooks demonstrating how to use MAPIE.
7+
8+
**Note: we recently released MAPIE v1.0.0, which introduces breaking API changes. Not all notebooks have been updated to the new API yet. These are marked as `[Pre-v1]`.**

notebooks/regression/exoplanets.ipynb

+8-6
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,19 @@
44
"cell_type": "markdown",
55
"id": "88266fe7-93bb-48c7-a84b-7a3ebe24c2c3",
66
"metadata": {},
7-
"source": [
8-
"# Estimating the uncertainties in the exoplanet masses"
9-
]
7+
"source": "# Estimating the uncertainties in the exoplanet masses"
8+
},
9+
{
10+
"metadata": {},
11+
"cell_type": "markdown",
12+
"source": "**Note: we recently released MAPIE v1.0.0, which introduces breaking API changes. This notebook hasn't been updated to the new API yet.**",
13+
"id": "43970544651bd3bb"
1014
},
1115
{
1216
"cell_type": "markdown",
1317
"id": "66082f1a-7415-4392-973f-a267b23ec64b",
1418
"metadata": {},
15-
"source": [
16-
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/scikit-learn-contrib/MAPIE/blob/master/notebooks/regression/exoplanets.ipynb)\n"
17-
]
19+
"source": "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/scikit-learn-contrib/MAPIE/blob/master/notebooks/regression/exoplanets.ipynb)\n"
1820
},
1921
{
2022
"cell_type": "markdown",

notebooks/regression/tutorial_regression.ipynb

+8-4
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,20 @@
44
"cell_type": "markdown",
55
"id": "a1d2af1c",
66
"metadata": {},
7-
"source": [
8-
"# Tutorial for regression"
9-
]
7+
"source": "# Tutorial for regression"
8+
},
9+
{
10+
"metadata": {},
11+
"cell_type": "markdown",
12+
"source": "**Note: we recently released MAPIE v1.0.0, which introduces breaking API changes. This notebook hasn't been updated to the new API yet.**",
13+
"id": "1a0c1682ad61ba3e"
1014
},
1115
{
1216
"cell_type": "markdown",
1317
"id": "9a2e808e",
1418
"metadata": {},
1519
"source": [
16-
"In this tutorial, we compare the prediction intervals estimated by MAPIE on a \n",
20+
"In this tutorial, we compare the prediction intervals estimated by MAPIE on a\n",
1721
"simple, one-dimensional, ground truth function\n",
1822
"\n",
1923
"$$\n",

0 commit comments

Comments
 (0)