Skip to content

Commit 4db3133

Browse files
author
Vincent Blot
committed
FIX: add number to parts of the notebook
1 parent 55a730a commit 4db3133

File tree

3 files changed

+26
-11
lines changed

3 files changed

+26
-11
lines changed

doc/Cifar10.rst

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ What is done in this tutorial ?
1818

1919
..
2020
21-
- Create a custom class `TensorflowToMapie` to resolve adherence
21+
- Create a custom class ``TensorflowToMapie`` to resolve adherence
2222
problems between Tensorflow and Mapie
2323

2424
Tutorial preparation
@@ -319,8 +319,8 @@ a perfect classifier.
319319
model.compile(loss=loss, optimizer=optimizer, metrics=metrics)
320320
return model
321321
322-
Training the algorithm with a custom class called `TensorflowToMapie`
323-
-----------------------------------------------------------------------
322+
3. Training the algorithm with a custom class called ``TensorflowToMapie``
323+
--------------------------------------------------------------------------
324324

325325
As MAPIE asked that the model has a `fit`, `predict_proba`,
326326
`predict` class attributes and that the information about if whether
@@ -492,7 +492,7 @@ or not the model is fitted.
492492
y_pred = cirfar10_model.predict(X_test)
493493
494494
495-
3. Prediction of the prediction sets
495+
4. Prediction of the prediction sets
496496
------------------------------------
497497

498498
We will now estimate the prediction sets with the five conformal methods
@@ -664,7 +664,7 @@ label whose cumulated score is above the given quantile, tends to give
664664
slightly higher marginal coverages since the prediction sets are
665665
slightly too big.
666666

667-
4. Visualization of the prediction sets
667+
6. Visualization of the prediction sets
668668
---------------------------------------
669669

670670
.. code-block:: python
@@ -896,7 +896,7 @@ generation of null prediction sets. The compromise between estimating
896896
null prediction sets with calibrated coverages or non-empty prediction
897897
sets but with larger marginal coverages is entirely up to the user.
898898

899-
6. Prediction set sizes
899+
7. Prediction set sizes
900900
-----------------------
901901

902902
.. code-block:: python
@@ -914,7 +914,7 @@ sets but with larger marginal coverages is entirely up to the user.
914914
.. image:: Cifar10_files/Cifar10_41_0.png
915915

916916

917-
7. Conditional coverages
917+
8. Conditional coverages
918918
------------------------
919919

920920
We just saw that all our methods (except the “naive” one) give marginal
@@ -974,6 +974,19 @@ different conformal methods.
974974
plt.legend(loc=[1, 0])
975975
976976
977+
978+
979+
.. parsed-literal::
980+
981+
982+
983+
984+
985+
.. parsed-literal::
986+
987+
988+
989+
977990
.. image:: Cifar10_files/Cifar10_46_2.png
978991

979992

notebooks/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ convert2rst:
99
gsed -i -e's/.. code:: ipython3/.. code-block:: python/g' $(dir)/$(file).rst
1010
gsed -i -e's/``/`/g' $(dir)/$(file).rst
1111
gsed -i -e's/`TensorflowToMapie`/``TensorflowToMapie``/g' $(dir)/$(file).rst
12+
gsed -i -e'/<matplotlib/d' $(dir)/$(file).rst
13+
gsed -i -e'/<Figure/d' $(dir)/$(file).rst
1214
cp $(dir)/$(file).rst ../doc/$(file).rst
1315
cp -r $(dir)/$(file)_files ../doc/
1416
rm -rf $(dir)/.ipynb_checkpoints

notebooks/classification/Cifar10.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@
587587
"cell_type": "markdown",
588588
"metadata": {},
589589
"source": [
590-
"## 3. Prediction of the prediction sets"
590+
"## 4. Prediction of the prediction sets"
591591
]
592592
},
593593
{
@@ -822,7 +822,7 @@
822822
"cell_type": "markdown",
823823
"metadata": {},
824824
"source": [
825-
"## 4. Visualization of the prediction sets"
825+
"## 6. Visualization of the prediction sets"
826826
]
827827
},
828828
{
@@ -1103,7 +1103,7 @@
11031103
"cell_type": "markdown",
11041104
"metadata": {},
11051105
"source": [
1106-
"## 6. Prediction set sizes"
1106+
"## 7. Prediction set sizes"
11071107
]
11081108
},
11091109
{
@@ -1138,7 +1138,7 @@
11381138
"cell_type": "markdown",
11391139
"metadata": {},
11401140
"source": [
1141-
"## 7. Conditional coverages"
1141+
"## 8. Conditional coverages"
11421142
]
11431143
},
11441144
{

0 commit comments

Comments
 (0)