Skip to content

Commit daeda3b

Browse files
committed
minor improv gibbs
1 parent e4278bd commit daeda3b

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

examples/conditional_cp/3-scientific-articles/plot_gibbs2023_simulations.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
``ConditionalSplitConformalRegressor``
66
is used to reproduce a part of the paper experiments of Gibbs et al. (2023) in
77
their article [1] which we argue is a good procedure to get adaptative
8-
prediction intervals (PI) and a guaranteed coverage on all sub groups of
8+
prediction intervals and a guaranteed coverage on all sub groups of
99
interest.
1010
1111
For a given model, the simulation uses the
1212
``ConditionalSplitConformalRegressor`` class, on a synthetic dataset first considered by Romano et al. (2019)
13-
[2], and compares the bounds of the PIs with the standard SplitConformalRegressor.
13+
[2], and compares the bounds of the intervals with the standard ``SplitConformalRegressor``.
1414
1515
This simulation is carried out to check that the conditional method implemented in
16-
MAPIE gives the same results as [1], and that the bounds of the PIs are
16+
MAPIE gives the same results as [1], and that the bounds of the intervals are
1717
obtained.
1818
1919
[1] Isaac Gibbs, John J. Cherian, Emmanuel J. Candès (2023).
@@ -24,7 +24,7 @@
2424
33rd Conference on Neural Information Processing Systems (NeurIPS 2019).
2525
"""
2626

27-
# sphinx_gallery_thumbnail_number = 2
27+
# mkdocs_gallery_thumbnail_number = 2
2828

2929
import matplotlib.pyplot as plt
3030
import numpy as np
@@ -401,8 +401,14 @@ def plot_results(X_test, y_test, n_trials=20, experiment="Groups"):
401401
# prediction. Groups are defined with intervals of $x$. The second experiment
402402
# illustrates the case of covariate shift.
403403

404+
###############################################################################
405+
# Group-conditional experiment
406+
# -----------------------------------------------------------------------------
404407
plot_results(X_test, y_test, experiment="Groups")
405408

409+
###############################################################################
410+
# Covariate shift experiment
411+
# -----------------------------------------------------------------------------
406412
plot_results(X_test, y_test, experiment="Shifts")
407413

408414

0 commit comments

Comments
 (0)