|
19 | 19 | Please note that the coverage obtained with Mondrian depends on the size of the |
20 | 20 | groups: therefore, the groups must be large enough for the coverage to represent the |
21 | 21 | model's performance on each of them accurately. If the groups are too small (e.g., |
22 | | -fewer than 200 samples within the group's conformity set), the conformalization may |
23 | | -become unstable, likely resulting in high variance in the effective coverage obtained. |
| 22 | +fewer than 200 samples within the group's conformalization set), the conformalization |
| 23 | +may become unstable, likely resulting in high variance in the effective coverage |
| 24 | +obtained. |
24 | 25 |
|
25 | 26 |
|
26 | 27 | Throughout this tutorial, we will answer the following questions: |
|
102 | 103 | plt.show() |
103 | 104 |
|
104 | 105 | ####################################################################################### |
105 | | -# 2. Split the dataset into a training set, a conformity set, and a test set |
| 106 | +# 2. Split the dataset into a training set, a conformalization set, and a test set |
106 | 107 | # ------------------------------------------------------------------------------------ |
107 | 108 |
|
108 | 109 | (X_train, X_conformalize, X_test, |
|
118 | 119 | ) |
119 | 120 |
|
120 | 121 | ############################################################################## |
121 | | -# We plot the training set, the conformity set, and the test set. |
| 122 | +# We plot the training set, the conformalization set, and the test set. |
122 | 123 |
|
123 | 124 |
|
124 | 125 | f, ax = plt.subplots(1, 3, figsize=(15, 5)) |
125 | 126 | ax[0].scatter(X_train, y_train, c=partition_train) |
126 | 127 | ax[0].set_title("Train set") |
127 | 128 | ax[1].scatter(X_conformalize, y_conformalize, c=partition_conformalize) |
128 | | -ax[1].set_title("Conformity set") |
| 129 | +ax[1].set_title("Conformalization set") |
129 | 130 | ax[2].scatter(X_test, y_test, c=partition_test) |
130 | 131 | ax[2].set_title("Test set") |
131 | 132 | plt.show() |
|
145 | 146 |
|
146 | 147 |
|
147 | 148 | ####################################################################################### |
148 | | -# Conformalize a SplitConformalRegressor on the conformity set |
| 149 | +# Conformalize a SplitConformalRegressor on the conformalization set |
149 | 150 | # ************************************************************************************* |
150 | 151 |
|
151 | 152 |
|
|
212 | 213 |
|
213 | 214 |
|
214 | 215 | ####################################################################################### |
215 | | -# Conformalize a SplitConformalRegressor on the conformity set for each group |
| 216 | +# Conformalize a SplitConformalRegressor on the conformalization set for each group |
216 | 217 | # ************************************************************************************* |
217 | | -# For each group in the conformity set, we conformalize a distinct |
| 218 | +# For each group in the conformalization set, we conformalize a distinct |
218 | 219 | # :class:`~mapie.regression.SplitConformalRegressor`. |
219 | 220 |
|
220 | 221 |
|
|
0 commit comments